diff --git a/scripts/material-ui/generate.js b/scripts/material-ui/generate.js deleted file mode 100644 index 06e6983a44..0000000000 --- a/scripts/material-ui/generate.js +++ /dev/null @@ -1,147 +0,0 @@ -const {get} = require('https') -const {readdir, readFile, writeFile} = require('fs') -const {join, extname, basename, dirname, relative} = require('path') - -const token = process.env.GITHUB_ACCESS_TOKEN || '' - -const toMixedCase = (name) => { - let dist = name[0].toUpperCase() - for (let i = 1; i < name.length; i++) { - const c = name[i] - if (c !== '-') { - dist += c - continue - } - i++ - dist += name[i].toUpperCase() - } - return dist -} - -const github = (path) => new Promise((resolve, reject) => { - get({ - headers: {'user-agent': 'DefinitelyTyped/material-ui/generate'}, - host: 'api.github.com', - path, - }, (res) => { - if ((res.statusCode / 100 >> 0) != 2) { - reject(`GitHub response: ${res.statusCode} ${res.statusMessage}`) - return - } - let data = ''; - res - .on('data', (chunk) => data += chunk) - .on('end', () => resolve(JSON.parse(data))) - }).on('error', reject) -}) - -const categories = () => github(`/repos/callemall/material-ui/contents/src/svg-icons?ref=master&access_token=${token}`) - -const contents = (path) => github(`/repos/callemall/material-ui/contents/${path}?ref=master&access_token=${token}`) - -const collator = new Intl.Collator() - -const resolvePath = (filename) => join(__dirname, '../../types/material-ui', filename) - -const readText = (filename) => new Promise((resolve, reject) => { - readFile(resolvePath(filename), 'utf8', (err, data) => { - if (err != null) { - reject(err) - return - } - resolve(data) - }) -}) - -const writeText = (filename, text) => new Promise((resolve, reject) => { - writeFile(resolvePath(filename), text, 'utf8', (err) => { - if (err != null) { - reject(err) - return - } - resolve() - }) -}) - -const inject = (content) => { - content.category = this.name - return content -} - -const rMark = /(\/{2} \{{3})[\s\S]*?(\/{2} \}{3})/g - -categories() - .then((cats) => Promise.all(Array.prototype.map.call(cats, (cat) => contents(cat.path) - .then((cons) => Array.prototype.map.call(cons, (con) => { - con.category = cat.name - return con - })) - ))) - .then((contentsList) => Array.prototype.concat.apply([], contentsList) - .map((content) => { - const {path} = content - const name = basename(path, extname(path)) - content.id = join(relative('src', dirname(path)), name) - content.className = toMixedCase(content.category) + toMixedCase(name) - return content - }) - .sort((a, b) => collator.compare(a.id, b.id)) - .reduce((prev, content) => { - const {dts, test} = prev - dts.individuals.push(`declare module 'material-ui/${content.id}' { - export import ${content.className} = __MaterialUI.SvgIcon; - export default ${content.className}; -}`) - dts.summarizeds.push(` export import ${content.className} = __MaterialUI.SvgIcon; // require('material-ui/${content.id}');`) - - test.individuals.push(`import _${content.className} from 'material-ui/${content.id}';`) - test.summarizeds.push(` ${content.className},`) - return prev - }, { - dts: {individuals: [], summarizeds: []}, - test: {individuals: [], summarizeds: []}, - }) -) - .then(({dts, test}) => { - return Promise.all([ - (() => { - const {individuals, summarizeds} = dts - const file = 'index.d.ts' - let index = 0 - return readText(file) - .then((script) => writeText(file, script.replace(rMark, (_, p1, p2) => { - let text = '' - switch (index) { - case 0: - text = individuals.join('\n\n') - break - case 1: - text = summarizeds.join('\n') - break - } - index++ - return p1 + '\n' + text + '\n' + p2 - }))) - })(), - (() => { - const {individuals, summarizeds} = test - const file = join('material-ui-tests.tsx') - let index = 0 - return readText(file) - .then((script) => writeText(file, script.replace(rMark, (_, p1, p2) => { - let text = '' - switch (index) { - case 0: - text = individuals.join('\n') - break - case 1: - text = summarizeds.join('\n') - break - } - index++ - return p1 + '\n' + text + '\n' + p2 - }))) - })(), - ]) - }) - .catch((err) => console.error(err)) diff --git a/types/acl/index.d.ts b/types/acl/index.d.ts index 3aa81de8e3..43de3f5369 100644 --- a/types/acl/index.d.ts +++ b/types/acl/index.d.ts @@ -50,7 +50,10 @@ interface Acl { allowedPermissions: (userId: Value, resources: strings, cb?: AnyCallback) => Promise; isAllowed: (userId: Value, resources: strings, permissions: strings, cb?: AllowedCallback) => Promise; areAnyRolesAllowed: (roles: strings, resource: strings, permissions: strings, cb?: AllowedCallback) => Promise; - whatResources: (roles: strings, permissions: strings, cb?: AnyCallback) => Promise; + whatResources: { + (roles: strings, cb?: AnyCallback): Promise; + (roles: strings, permissions: strings, cb?: AnyCallback): Promise; + } permittedResources: (roles: strings, permissions: strings, cb?: Function) => Promise; middleware: (numPathComponents?: number, userId?: Value | GetUserId, actions?: strings) => express.RequestHandler; } diff --git a/types/acl/test/index.ts b/types/acl/test/index.ts index c29574326d..bb3e6fa54e 100644 --- a/types/acl/test/index.ts +++ b/types/acl/test/index.ts @@ -66,6 +66,18 @@ acl.isAllowed('joed', 'blogs', 'view', (err, res) => { } }); +acl.whatResources('foo', (err, res) => { + if (res) { + console.log(res); + } +}); + +acl.whatResources('foo', 'view', (err, res) => { + if (res) { + console.log(res); + } +}); + acl.isAllowed('jsmith', 'blogs', ['edit','view','delete']) .then((result) => { console.dir('jsmith is allowed blogs ' + result); diff --git a/types/aframe/tslint.json b/types/aframe/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/aframe/tslint.json +++ b/types/aframe/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts index 8c5e3e19bb..964eb1b836 100644 --- a/types/agenda/agenda-tests.ts +++ b/types/agenda/agenda-tests.ts @@ -3,16 +3,16 @@ import * as Agenda from "agenda"; var mongoConnectionString = "mongodb://127.0.0.1/agenda"; var agenda = new Agenda({ db: { address: mongoConnectionString } }); - - + + agenda.define('delete old users', (job, done) => { }); agenda.on('ready', () => { agenda.every('3 minutes', 'delete old users'); - - // Alternatively, you could also do: + + // Alternatively, you could also do: agenda.every('*/3 * * * *', 'delete old users'); agenda.start(); @@ -81,6 +81,8 @@ agenda.stop(function() { process.exit(0); }); +job.agenda.now('do the hokey pokey'); + job.repeatEvery('10 minutes'); job.repeatAt('3:30pm'); diff --git a/types/agenda/index.d.ts b/types/agenda/index.d.ts index fe8ecc45a6..d170a6f6f1 100644 --- a/types/agenda/index.d.ts +++ b/types/agenda/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Agenda v0.8.9 +// Type definitions for Agenda v1.0.0 // Project: https://github.com/rschmukler/agenda // Definitions by: Meir Gottlieb // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -337,6 +337,11 @@ declare namespace Agenda { */ attrs: JobAttributes; + /** + * The agenda that created the job. + */ + agenda: Agenda; + /** * Specifies an interval on which the job should repeat. * @param interval A human-readable format String, a cron format String, or a Number. diff --git a/types/alexa-sdk/index.d.ts b/types/alexa-sdk/index.d.ts index 983c2fa063..1c39755b2d 100644 --- a/types/alexa-sdk/index.d.ts +++ b/types/alexa-sdk/index.d.ts @@ -98,10 +98,34 @@ export interface Request { locale?: string; } +export interface ResolutionStatus { + code: string; +} + +export interface ResolutionValue { + name: string; + id: string; +} + +export interface ResolutionValueContainer { + value: ResolutionValue; +} + +export interface Resolution { + authority: string; + status: ResolutionStatus; + values: ResolutionValueContainer[]; +} + +export interface Resolutions { + resolutionsPerAuthority: Resolution[]; +} + export interface SlotValue { confirmationStatus?: ConfirmationStatuses; name: string; value?: any; + resolutions?: Resolutions; } export interface Intent { diff --git a/types/arcgis-to-geojson-utils/tslint.json b/types/arcgis-to-geojson-utils/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/arcgis-to-geojson-utils/tslint.json +++ b/types/arcgis-to-geojson-utils/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/argparse/argparse-tests.ts b/types/argparse/argparse-tests.ts index f5b9e76f81..aef18b665b 100644 --- a/types/argparse/argparse-tests.ts +++ b/types/argparse/argparse-tests.ts @@ -1,25 +1,24 @@ - // near copy of each of the tests from https://github.com/nodeca/argparse/tree/master/examples import { ArgumentParser, RawDescriptionHelpFormatter } from 'argparse'; -var args: any; +let args: any; -var simpleExample = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse example', +const simpleExample = new ArgumentParser({ + version: '0.0.1', + addHelp: true, + description: 'Argparse example', }); simpleExample.addArgument( - ['-f', '--foo'], - { - help: 'foo bar', - } + ['-f', '--foo'], + { + help: 'foo bar', + } ); simpleExample.addArgument( - ['-b', '--bar'], - { - help: 'bar foo', - } + ['-b', '--bar'], + { + help: 'bar foo', + } ); simpleExample.printHelp(); @@ -35,13 +34,10 @@ args = simpleExample.parseArgs('--foo 5 --bar 6'.split(' ')); console.dir(args); console.log('-----------'); - - - -var choicesExample = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: choice' +const choicesExample = new ArgumentParser({ + version: '0.0.1', + addHelp: true, + description: 'Argparse examples: choice' }); choicesExample.addArgument(['foo'], { choices: 'abc' }); @@ -55,56 +51,53 @@ console.log('-----------'); // choicesExample.parseArgs(['X']); // console.dir(args); - - - -var constantExample = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: constant' +const constantExample = new ArgumentParser({ + version: '0.0.1', + addHelp: true, + description: 'Argparse examples: constant' }); constantExample.addArgument( - ['-a'], - { - action: 'storeConst', - dest: 'answer', - help: 'store constant', - constant: 42 - } + ['-a'], + { + action: 'storeConst', + dest: 'answer', + help: 'store constant', + constant: 42 + } ); constantExample.addArgument( - ['--str'], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "str" to types', - constant: 'str' - } + ['--str'], + { + action: 'appendConst', + dest: 'types', + help: 'append constant "str" to types', + constant: 'str' + } ); constantExample.addArgument( - ['--int'], - { - action: 'appendConst', - dest: 'types', - help: 'append constant "int" to types', - constant: 'int' - } + ['--int'], + { + action: 'appendConst', + dest: 'types', + help: 'append constant "int" to types', + constant: 'int' + } ); constantExample.addArgument( - ['--true'], - { - action: 'storeTrue', - help: 'store true constant' - } + ['--true'], + { + action: 'storeTrue', + help: 'store true constant' + } ); constantExample.addArgument( - ['--false'], - { - action: 'storeFalse', - help: 'store false constant' - } + ['--false'], + { + action: 'storeFalse', + help: 'store false constant' + } ); constantExample.printHelp(); @@ -113,27 +106,24 @@ console.log('-----------'); args = constantExample.parseArgs('-a --str --int --true'.split(' ')); console.dir(args); - - - -var nargsExample = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: nargs' +const nargsExample = new ArgumentParser({ + version: '0.0.1', + addHelp: true, + description: 'Argparse examples: nargs' }); nargsExample.addArgument( - ['-f', '--foo'], - { - help: 'foo bar', - nargs: 1 - } + ['-f', '--foo'], + { + help: 'foo bar', + nargs: 1 + } ); nargsExample.addArgument( - ['-b', '--bar'], - { - help: 'bar foo', - nargs: '*' - } + ['-b', '--bar'], + { + help: 'bar foo', + nargs: '*' + } ); nargsExample.printHelp(); @@ -145,40 +135,34 @@ console.log('-----------'); args = nargsExample.parseArgs('--bar b c f --foo a'.split(' ')); console.dir(args); - - - -var parent_parser = new ArgumentParser({ addHelp: false }); +const parent_parser = new ArgumentParser({ addHelp: false }); // note addHelp:false to prevent duplication of the -h option parent_parser.addArgument( - ['--parent'], - { type: 'int', help: 'parent' } + ['--parent'], + { type: 'int', help: 'parent' } ); -var foo_parser = new ArgumentParser({ - parents: [parent_parser], - description: 'child1' +const foo_parser = new ArgumentParser({ + parents: [parent_parser], + description: 'child1' }); foo_parser.addArgument(['foo']); args = foo_parser.parseArgs(['--parent', '2', 'XXX']); console.log(args); -var bar_parser = new ArgumentParser({ - parents: [parent_parser], - description: 'child2' +const bar_parser = new ArgumentParser({ + parents: [parent_parser], + description: 'child2' }); bar_parser.addArgument(['--bar']); args = bar_parser.parseArgs(['--bar', 'YYY']); console.log(args); - - - -var prefixCharsExample = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: prefix_chars', - prefixChars: '-+' +const prefixCharsExample = new ArgumentParser({ + version: '0.0.1', + addHelp: true, + description: 'Argparse examples: prefix_chars', + prefixChars: '-+' }); prefixCharsExample.addArgument(['+f', '++foo']); prefixCharsExample.addArgument(['++bar'], { action: 'storeTrue' }); @@ -193,39 +177,36 @@ console.dir(args); args = prefixCharsExample.parseArgs(['++foo', '2', '++bar']); console.dir(args); - - - -var subparserExample = new ArgumentParser({ - version: '0.0.1', - addHelp: true, - description: 'Argparse examples: sub-commands' +const subparserExample = new ArgumentParser({ + version: '0.0.1', + addHelp: true, + description: 'Argparse examples: sub-commands' }); -var subparsers = subparserExample.addSubparsers({ - title: 'subcommands', - dest: "subcommand_name" +const subparsers = subparserExample.addSubparsers({ + title: 'subcommands', + dest: "subcommand_name" }); -var bar = subparsers.addParser('c1', { addHelp: true, help: 'c1 help' }); +let bar = subparsers.addParser('c1', { addHelp: true, help: 'c1 help' }); bar.addArgument( - ['-f', '--foo'], - { - action: 'store', - help: 'foo3 bar3' - } + ['-f', '--foo'], + { + action: 'store', + help: 'foo3 bar3' + } ); -var bar = subparsers.addParser( - 'c2', - { aliases: ['co'], addHelp: true, help: 'c2 help' } +bar = subparsers.addParser( + 'c2', + { aliases: ['co'], addHelp: true, help: 'c2 help' } ); bar.addArgument( - ['-b', '--bar'], - { - action: 'store', - type: 'int', - help: 'foo3 bar3' - } + ['-b', '--bar'], + { + action: 'store', + type: 'int', + help: 'foo3 bar3' + } ); subparserExample.printHelp(); console.log('-----------'); @@ -241,66 +222,51 @@ console.dir(args); console.log('-----------'); subparserExample.parseArgs(['c1', '-h']); - - - -var functionExample = new ArgumentParser({ description: 'Process some integers.' }); +const functionExample = new ArgumentParser({ description: 'Process some integers.' }); function sum(arr: number[]) { - return arr.reduce(function(a, b) { - return a + b; - }, 0); + return arr.reduce((a, b) => a + b, 0); } function max(arr: number[]) { - return Math.max.apply(Math, arr); + return Math.max.apply(Math, arr); } - functionExample.addArgument(['integers'], { - metavar: 'N', - type: 'int', - nargs: '+', - help: 'an integer for the accumulator' + metavar: 'N', + type: 'int', + nargs: '+', + help: 'an integer for the accumulator' }); functionExample.addArgument(['--sum'], { - dest: 'accumulate', - action: 'storeConst', - constant: sum, - defaultValue: max, - help: 'sum the integers (default: find the max)' + dest: 'accumulate', + action: 'storeConst', + constant: sum, + defaultValue: max, + help: 'sum the integers (default: find the max)' }); args = functionExample.parseArgs('--sum 1 2 -1'.split(' ')); console.log(args.accumulate(args.integers)); - - - -var formatterExample = new ArgumentParser({ - prog: 'PROG', - formatterClass: RawDescriptionHelpFormatter, - description: 'Keep the formatting\n' + - ' exactly as it is written\n' + - '\n' + - 'here\n' +const formatterExample = new ArgumentParser({ + prog: 'PROG', + formatterClass: RawDescriptionHelpFormatter, + description: `Keep the formatting\nexactly as it is written\n\nhere\n`, }); formatterExample.addArgument(['--foo'], { - help: ' foo help should not\n' + - ' retain this odd formatting' + help: `foo help should not\nretain this odd formatting`, }); formatterExample.addArgument(['spam'], { - 'help': 'spam help' + help: 'spam help', }); -var group = formatterExample.addArgumentGroup({ - title: 'title', - description: ' This text\n' + - ' should be indented\n' + - ' exactly like it is here\n' +const group = formatterExample.addArgumentGroup({ + title: 'title', + description: `This text\nshould be indented\nexactly like it is here\n`, }); group.addArgument(['--bar'], { - help: 'bar help' + help: 'bar help' }); formatterExample.printHelp(); diff --git a/types/argparse/index.d.ts b/types/argparse/index.d.ts index 2661b01c12..f19aadbe96 100644 --- a/types/argparse/index.d.ts +++ b/types/argparse/index.d.ts @@ -1,31 +1,39 @@ -// Type definitions for argparse v1.0.3 +// Type definitions for argparse 1.0 // Project: https://github.com/nodeca/argparse // Definitions by: Andrew Schurman +// Tomasz Łaziuk // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 - -export declare class ArgumentParser extends ArgumentGroup { +export class ArgumentParser extends ArgumentGroup { constructor(options?: ArgumentParserOptions); - addSubparsers(options?: SubparserOptions): SubParser; - parseArgs(args?: string[], ns?: Namespace | Object): any; + parseArgs(args?: string[], ns?: Namespace | object): any; printUsage(): void; printHelp(): void; formatUsage(): string; formatHelp(): string; - parseKnownArgs(args?: string[], ns?: Namespace | Object): any[]; + parseKnownArgs(args?: string[], ns?: Namespace | object): any[]; convertArgLineToArg(argLine: string): string[]; exit(status: number, message: string): void; error(err: string | Error): void; } -interface Namespace { } +export class Namespace { + constructor(options: object); + get(key: K, defaultValue?: D): this[K] | D; + isset(key: K): boolean; + set(key: K, value: V): this; + set(key: K, value: V): this & Record; + set(obj: K): this & K; + unset(key: K, defaultValue?: D): this[K] | D; +} -declare class SubParser { +export class SubParser { addParser(name: string, options?: SubArgumentParserOptions): ArgumentParser; } -declare class ArgumentGroup { +export class ArgumentGroup { addArgument(args: string[], options?: ArgumentOptions): void; addArgumentGroup(options?: ArgumentGroupOptions): ArgumentGroup; addMutuallyExclusiveGroup(options?: { required: boolean }): ArgumentGroup; @@ -33,7 +41,7 @@ declare class ArgumentGroup { getDefault(dest: string): any; } -interface SubparserOptions { +export interface SubparserOptions { title?: string; description?: string; prog?: string; @@ -44,12 +52,12 @@ interface SubparserOptions { metavar?: string; } -interface SubArgumentParserOptions extends ArgumentParserOptions { +export interface SubArgumentParserOptions extends ArgumentParserOptions { aliases?: string[]; help?: string; } -interface ArgumentParserOptions { +export interface ArgumentParserOptions { description?: string; epilog?: string; addHelp?: boolean; @@ -62,26 +70,27 @@ interface ArgumentParserOptions { version?: string; } -interface ArgumentGroupOptions { +export interface ArgumentGroupOptions { prefixChars?: string; argumentDefault?: any; title?: string; description?: string; } -export declare class HelpFormatter { } -export declare class ArgumentDefaultsHelpFormatter { } -export declare class RawDescriptionHelpFormatter { } -export declare class RawTextHelpFormatter { } +export class HelpFormatter { } +export class ArgumentDefaultsHelpFormatter { } +export class RawDescriptionHelpFormatter { } +export class RawTextHelpFormatter { } -interface ArgumentOptions { +export interface ArgumentOptions { action?: string; optionStrings?: string[]; dest?: string; nargs?: string | number; constant?: any; defaultValue?: any; - type?: string | Function; + // type may be a string (primitive) or a Function (constructor) + type?: string | Function; // tslint:disable-line:ban-types choices?: string | string[]; required?: boolean; help?: string; diff --git a/types/argparse/tslint.json b/types/argparse/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/argparse/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/autobahn/index.d.ts b/types/autobahn/index.d.ts index 3c576e2dc8..7f01a53e3a 100644 --- a/types/autobahn/index.d.ts +++ b/types/autobahn/index.d.ts @@ -205,7 +205,7 @@ declare namespace autobahn { type DeferFactory = () => When.Promise; - type OnChallengeHandler = (session: Session, method: string, extra: any) => When.Promise; + type OnChallengeHandler = (session: Session, method: string, extra: any) => string; interface IConnectionOptions { use_es6_promises?: boolean; diff --git a/types/babel-core/index.d.ts b/types/babel-core/index.d.ts index 1ea5d888d8..a2476245c1 100644 --- a/types/babel-core/index.d.ts +++ b/types/babel-core/index.d.ts @@ -10,8 +10,12 @@ export { t as types }; export type Node = t.Node; export import template = require('babel-template'); export const version: string; -import traverse, { Visitor } from "babel-traverse"; +import traverse, { Visitor, NodePath } from "babel-traverse"; export { traverse, Visitor }; +import { BabylonOptions } from "babylon"; +export { BabylonOptions }; +import { GeneratorOptions } from "babel-generator"; +export { GeneratorOptions }; // A babel plugin is a simple function which must return an object matching // the following interface. Babel will throw if it finds unknown properties. @@ -38,14 +42,29 @@ export function transformFileSync(filename: string, opts?: TransformOptions): Ba export function transformFromAst(ast: Node, code?: string, opts?: TransformOptions): BabelFileResult; export interface TransformOptions { - /** Filename to use when reading from stdin - this will be used in source-maps, errors etc. Default: "unknown". */ - filename?: string; + /** Include the AST in the returned object. Default: `true`. */ + ast?: boolean; - /** Filename relative to `sourceRoot`. */ - filenameRelative?: string; + /** Attach a comment after all non-user injected code. */ + auxiliaryCommentAfter?: string; - /** A source map object that the output source map will be based on. */ - inputSourceMap?: object; + /** Attach a comment before all non-user injected code. */ + auxiliaryCommentBefore?: string; + + /** Specify whether or not to use `.babelrc` and `.babelignore` files. Default: `true`. */ + babelrc?: boolean; + + /** Enable code generation. Default: `true`. */ + code?: boolean; + + /** write comments to generated output. Default: `true`. */ + comments?: boolean; + + /** + * Do not include superfluous whitespace characters and line terminators. When set to `"auto"`, `compact` is set to + * `true` on input sizes of >100KB. + */ + compact?: boolean | "auto"; /** * This is an object of keys that represent different environments. For example, you may have: @@ -55,38 +74,68 @@ export interface TransformOptions { */ env?: object; - /** Retain line numbers - will result in really ugly code. Default: `false` */ - retainLines?: boolean; + /** A path to an .babelrc file to extend. */ + extends?: string; + + /** Filename to use when reading from stdin - this will be used in source-maps, errors etc. Default: "unknown". */ + filename?: string; + + /** Filename relative to `sourceRoot`. */ + filenameRelative?: string; + + /** An object containing the options to be passed down to the babel code generator, babel-generator. Default: `{}` */ + generatorOpts?: GeneratorOptions; + + /** + * Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. + * If falsy value is returned then the generated module id is used. + */ + getModuleId?(moduleName: string): string; /** Enable/disable ANSI syntax highlighting of code frames. Default: `true`. */ highlightCode?: boolean; - /** List of presets (a set of plugins) to load and use. */ - presets?: any[]; - - /** List of plugins to load and use. */ - plugins?: any[]; - /** list of glob paths to **not** compile. Opposite to the `only` option. */ ignore?: string[]; + /** A source map object that the output source map will be based on. */ + inputSourceMap?: object; + + /** Should the output be minified. Default: `false` */ + minified?: boolean; + + /** Specify a custom name for module ids. */ + moduleId?: string; + + /** + * If truthy, insert an explicit id for modules. By default, all modules are anonymous. + * (Not available for `common` modules). + */ + moduleIds?: boolean; + + /** Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. */ + moduleRoot?: string; + /** * A glob, regex, or mixed array of both, matching paths to only compile. Can also be an array of arrays containing * paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim. */ only?: string | RegExp | Array; - /** Enable code generation. Default: `true`. */ - code?: boolean; + /** Babylon parser options. */ + parserOpts?: BabylonOptions; - /** Include the AST in the returned object. Default: `true`. */ - ast?: boolean; + /** List of plugins to load and use. */ + plugins?: any[]; - /** A path to an .babelrc file to extend. */ - extends?: string; + /** List of presets (a set of plugins) to load and use. */ + presets?: any[]; - /** write comments to generated output. Default: `true`. */ - comments?: boolean; + /** Retain line numbers - will result in really ugly code. Default: `false` */ + retainLines?: boolean; + + /** Resolve a module source ie. import "SOURCE"; to a custom value. */ + resolveModuleSource?(source: string, filename: string): string; /** * An optional callback that controls whether a comment should be output or not. Called as @@ -94,11 +143,8 @@ export interface TransformOptions { */ shouldPrintComment?(comment: string): boolean; - /** - * Do not include superfluous whitespace characters and line terminators. When set to `"auto"`, `compact` is set to - * `true` on input sizes of >100KB. - */ - compact?: boolean | "auto"; + /** Set `sources[0]` on returned source map. */ + sourceFileName?: string; /** * If truthy, adds a `map` property to returned output. If set to `"inline"`, a comment with a `sourceMappingURL` @@ -110,38 +156,16 @@ export interface TransformOptions { /** Set `file` on returned source map. */ sourceMapTarget?: string; - /** Set `sources[0]` on returned source map. */ - sourceFileName?: string; - /** The root from which all sources are relative. */ sourceRoot?: string; - /** Specify whether or not to use `.babelrc` and `.babelignore` files. Default: `true`. */ - babelrc?: boolean; + /** Indicate the mode the code should be parsed in. Can be either “script” or “module”. Default: "module" */ + sourceType?: "script" | "module"; - /** Attach a comment before all non-user injected code. */ - auxiliaryCommentBefore?: string; - - /** Attach a comment after all non-user injected code. */ - auxiliaryCommentAfter?: string; - - /** - * Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. - * If falsy value is returned then the generated module id is used. + /** An optional callback that can be used to wrap visitor methods. + * NOTE: This is useful for things like introspection, and not really needed for implementing anything. */ - getModuleId?(moduleName: string): string; - - /** Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. */ - moduleRoot?: string; - - /** - * If truthy, insert an explicit id for modules. By default, all modules are anonymous. - * (Not available for `common` modules). - */ - moduleIds?: boolean; - - /** Specify a custom name for module ids. */ - moduleId?: string; + wrapPluginVisitorMethod?(pluginAlias: string, visitorType: 'enter' | 'exit', callback: (path: NodePath, state: any) => void): (path: NodePath, state: any) => void ; } export interface BabelFileResult { diff --git a/types/babel-plugin-react-pug/babel-plugin-react-pug-tests.tsx b/types/babel-plugin-react-pug/babel-plugin-react-pug-tests.tsx new file mode 100644 index 0000000000..23d8205d4b --- /dev/null +++ b/types/babel-plugin-react-pug/babel-plugin-react-pug-tests.tsx @@ -0,0 +1,4 @@ +// $ExpectType any +pug` + p Hello pug! +`; diff --git a/types/babel-plugin-react-pug/index.d.ts b/types/babel-plugin-react-pug/index.d.ts new file mode 100644 index 0000000000..2cc311d627 --- /dev/null +++ b/types/babel-plugin-react-pug/index.d.ts @@ -0,0 +1,6 @@ +// Type definitions for babel-plugin-react-pug 0.5 +// Project: https://github.com/ljbc1994/babel-plugin-react-pug +// Definitions by: John Papandriopoulos +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare var pug: any; diff --git a/types/babel-plugin-react-pug/tsconfig.json b/types/babel-plugin-react-pug/tsconfig.json new file mode 100644 index 0000000000..9e1bdd2e0c --- /dev/null +++ b/types/babel-plugin-react-pug/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "babel-plugin-react-pug-tests.tsx" + ] +} diff --git a/types/babel-plugin-react-pug/tslint.json b/types/babel-plugin-react-pug/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/babel-plugin-react-pug/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/backbone.marionette/backbone.marionette-tests.ts b/types/backbone.marionette/backbone.marionette-tests.ts index a7da55495b..23a037d49c 100644 --- a/types/backbone.marionette/backbone.marionette-tests.ts +++ b/types/backbone.marionette/backbone.marionette-tests.ts @@ -6,12 +6,12 @@ class DestroyWarn extends Marionette.Behavior { // just like you can in your Backbone Models // they will be overriden if you pass in an option with the same key defaults = { - "message": "you are destroying!" + message: 'you are destroying!' }; // behaviors have events that are bound to the views DOM events = { - "click @ui.destroy": "warnBeforeDestroy" + 'click @ui.destroy': 'warnBeforeDestroy' }; warnBeforeDestroy() { @@ -22,34 +22,32 @@ class DestroyWarn extends Marionette.Behavior { } } - Marionette.Behaviors.getBehaviorClass = (options, key) => { - if (key === "DestroyWarn") + if (key === 'DestroyWarn') return DestroyWarn; return undefined; }; class MyRouter extends Marionette.AppRouter { - // "someMethod" must exist at controller.someMethod + // 'someMethod' must exist at controller.someMethod appRoutes = { - "some/route": "someMethod" + 'some/route': 'someMethod' }; /* standard routes can be mixed with appRoutes/Controllers above */ routes = { - "some/otherRoute": "someOtherMethod" + 'some/otherRoute': 'someOtherMethod' }; someOtherMethod() { // do something here. } - } class MyApplication extends Marionette.Application { initialize(options?: any) { - console.log("initializing application"); + console.log('initializing application'); this.layoutView = new AppLayoutView(); } @@ -60,12 +58,16 @@ class MyApplication extends Marionette.Application { this.mainRegion = new Marionette.Region({ el: '#main' }); this.layoutView.addRegion('main', this.mainRegion); this.layoutView.render(); - this.layoutView.showChildView('main', new MyView(new MyModel)); + this.layoutView.showChildView('main', new MyView(new MyModel())); let view: Backbone.View = this.layoutView.getChildView('main'); 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.View = this.layoutView.destroy(); + + let prefix: string; + if (typeof this.layoutView.childViewEventPrefix === 'string') { + this.layoutView.childViewEventPrefix; + } } } @@ -75,16 +77,15 @@ class AppLayoutView extends Marionette.View { } template() { - return "
"; + return '
'; } initialize(options?: any) { - console.log("initializing layoutview"); + console.log('initializing layoutview'); } } class MyModel extends Backbone.Model { - constructor(options?: any) { super(options); } @@ -99,22 +100,20 @@ class MyModel extends Backbone.Model { } class MyBaseView extends Marionette.View { - constructor() { - super(); - this.getOption('foo'); - this.triggers = { - 'click .foo': 'bar' - }; + super(); + this.getOption('foo'); + this.triggers = { + 'click .foo': 'bar' + }; } - } class MyView extends Marionette.View { behaviors: any; constructor(model: MyModel) { - super({ model: model }); + super({ model }); this.ui = { destroy: '.destroy' @@ -130,8 +129,7 @@ class MyView extends Marionette.View { template() { return '

' + this.model.getName() + '

'; } -}; - +} class MainRegion extends Marionette.Region { constructor() { @@ -140,7 +138,6 @@ class MainRegion extends Marionette.Region { } } - class MyObject extends Marionette.Object { name: string; options: any; @@ -153,13 +150,13 @@ class MyObject extends Marionette.Object { name: 'Foo' }; - this.on("before:destroy", () => { - console.log("before:destroy"); + this.on('before:destroy', () => { + console.log('before:destroy'); }); } onBeforeDestroy(arg: any) { - console.log("in onBeforeDestroy with arg " + arg); + console.log('in onBeforeDestroy with arg ' + arg); } } @@ -180,7 +177,7 @@ class MyJQueryRegion extends Marionette.Region { class MyHtmlElRegion extends Marionette.Region { constructor() { super(); - this.el = document.querySelector("body"); + this.el = document.querySelector('body'); } } @@ -189,77 +186,48 @@ class MyCollectionView extends Marionette.CollectionView { super(); this.childView = MyView; this.childViewEvents = { - render: function () { - console.log("a childView has been rendered"); + render() { + console.log('a childView has been rendered'); } }; - this.childViewOptions = function (model: any, index: any): any { + this.childViewOptions = (model: any, index: any): any => { // do some calculations based on the model return { - foo: "bar", - childIndex: index - } + id: 'bar' + }; }; this.childViewOptions = { - foo: "bar" + id: 'bar' }; - this.childViewEventPrefix = "some:prefix"; - - this.on('some:prefix:render', function () { + this.childViewEventPrefix = 'some:prefix'; + this.on('some:prefix:render', () => { }); - } } -var app: MyApplication; +let app: MyApplication; function ApplicationTests() { app = new MyApplication(); app.start(); - var view = new MyView(new MyModel()); + let view = new MyView(new MyModel()); app.mainRegion.show(view); } function ObjectTests() { - var obj = new MyObject(); + let obj = new MyObject(); console.log(obj.getOption('name')); - obj.destroy("goodbye"); -} - -function RegionManagerTests() { - var rm = new Marionette.RegionManager(); - rm.addRegions({ - contentRegion: { - el: '#content', - regionClass: MainRegion - }, - - navigationRegion: { - el: '#navigation', - regionClass: MainRegion, - - // Options passed to instance of `MyOtherRegion` for - // the `navigationRegion` on `App` - navigationOption: 42, - anotherNavigationOption: 'foo' - }, - - footerRegion: { - regionClass: MainRegion, - someOption: 42, - someValue: 'value' - } - }); + obj.destroy('goodbye'); } function RegionTests() { - var myView: Marionette.View = new MyView(new MyModel()); + let myView: Marionette.View = new MyView(new MyModel()); // render and display the view app.mainRegion.show(myView); @@ -268,28 +236,27 @@ function RegionTests() { app.mainRegion.empty(); myView = new MyView(new MyModel()); - app.mainRegion.show(myView, { preventDestroy: true, forceShow: true, triggerAttach: true, triggerBeforeAttach: false }); + app.mainRegion.show(myView, { preventDestroy: true }); - var hasView: boolean = app.mainRegion.hasView(); + let hasView: boolean = app.mainRegion.hasView(); app.mainRegion.reset(); - Marionette.Region.prototype.attachHtml = function (view: any): void { + Marionette.Region.prototype.attachHtml = (view: any): void => { this.$el.empty().append(view.el); - } + }; myView = new Marionette.View({ - el: $("#existing-view-stuff") + el: $('#existing-view-stuff') }); - app.mainRegion.attachView(myView); + app.mainRegion.show(myView); - app.mainRegion.on("empty", function (view: any, region: any, options: any) { + app.mainRegion.on('empty', (view: any, region: any, options: any) => { // manipulate the `view` or do something extra // with the `region` // you also have access to the `options` that were passed to the Region.show call }); - } function ViewTests() { @@ -301,29 +268,27 @@ function ViewTests() { } function CollectionViewTests() { - var cv = new MyCollectionView(); + let cv = new MyCollectionView(); cv.collection.add(new MyModel()); - app.mainRegion.attachView(cv); - cv.addEmptyView(new MyModel, MyView); - cv.proxyChildEvents(new MyView(new MyModel)); - let children: Backbone.ChildViewContainer> = cv.destroyChildren(); - let view: Marionette.CollectionView> = cv.destroy(); + app.mainRegion.show(cv); + cv.emptyView = MyView; + let view: Marionette.CollectionView = cv.destroy(); } -class MyController extends Marionette.Controller { +class MyController { + doFoo() { } + doBar() { } } function AppRouterTests() { - var myController = new MyController(); - var router = new MyRouter(); + let myController = new MyController(); + let router = new MyRouter(); - router.appRoute("/foo", "fooThat"); + router.appRoute('/foo', 'fooThat'); router.processAppRoutes(myController, { - "foo": "doFoo", - "bar/:id": "doBar" + foo: 'doFoo', + 'bar/:id': 'doBar' }); - } - diff --git a/types/backbone.marionette/index.d.ts b/types/backbone.marionette/index.d.ts index ad623aa078..5292a4bfe7 100644 --- a/types/backbone.marionette/index.d.ts +++ b/types/backbone.marionette/index.d.ts @@ -1,131 +1,199 @@ -// Type definitions for Marionette +// Type definitions for Marionette 3.3 // Project: https://github.com/marionettejs/ // Definitions by: Zeeshan Hamid , Natan Vivo , Sven Tschui // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 import * as Backbone from 'backbone'; +import * as JQuery from 'jquery'; import * as Radio from 'backbone.radio'; export as namespace Marionette; export = Marionette; -// declarations for Backbone.BabySitter and Backbone.Wreqr, different projects but included in MarionetteJS -declare module 'backbone' { - // Backbone.BabySitter - class ChildViewContainer> { +// These mixins mirror Marionette source and ensure that Marionette classes that +// extend these mixins have the correct methods attached. +interface CommonMixin { + normalizeMethods: any; + mergeOptions: any; + getOption: any; + bindEvents: any; + unbindEvents: any; +} - constructor(initialViews?: any[]); +interface RadioMixinOptions { + /** + * Defines the Radio channel that will be used for the requests and/or + * events. + */ + channelName?: string; - add(view: TView, customIndex?: number): void; - findByModel(model: TModel): TView; - findByModelCid(modelCid: string): TView; - findByCustom(index: number): TView; - findByIndex(index: number): TView; - findByCid(cid: string): TView; - remove(view: TView): void; + /** + * Defines an events hash with the events to be listened and its respective + * handlers. + */ + radioEvents?: any; - //mixins from Collection (copied from Backbone's Collection declaration) + /** + * Defines an events hash with the requests to be replied and its respective + * handlers + */ + radioRequests?: any; +} - all(iterator: (element: TView, index: number) => boolean, context?: any): boolean; - any(iterator: (element: TView, index: number) => boolean, context?: any): boolean; - contains(value: any): boolean; - detect(iterator: (item: any) => boolean, context?: any): any; - each(iterator: (element: TView, index: number, list?: any) => void, context?: any): any; - every(iterator: (element: TView, index: number) => boolean, context?: any): boolean; - filter(iterator: (element: TView, index: number) => boolean, context?: any): TView[]; - find(iterator: (element: TView, index: number) => boolean, context?: any): TView; - first(): TView; - forEach(iterator: (element: TView, index: number, list?: any) => void, context?: any): void; - include(value: any): boolean; - initial(): TView; - initial(n: number): TView[]; - invoke(methodName: string, args?: any[]): any; - isEmpty(object: any): boolean; - last(): TView; - last(n: number): TView[]; - lastIndexOf(element: TView, fromIndex?: number): number; - map(iterator: (element: TView, index: number, context?: any) => U, context?: any): U[]; - pluck(attribute: string): any[]; - reject(iterator: (element: TView, index: number) => boolean, context?: any): TView[]; - rest(): TView; - rest(n: number): TView[]; - select(iterator: any, context?: any): any[]; - some(iterator: (element: TView, index: number) => boolean, context?: any): boolean; - toArray(): any[]; - without(...values: any[]): TView[]; - } +interface RadioMixin { + getChannel: any; + bindEvents: any; + unbindEvents: any; + bindRequests: any; + unbindRequests: any; +} - // Backbone.Wreqr - namespace Wreqr { +interface DomMixin { + createBuffer: any; + appendChildren: any; + beforeEl: any; + replaceEl: any; + detachContents: any; + setInnerContent: any; + detachEl: any; + removeEl: any; + findEls: any; +} - namespace radio { +interface ViewMixinOptions { + /** + * Behavior objects to assign to this View. + */ + behaviors?: Marionette.Behavior[]; - function channel(channelName: string): Channel; + /** + * Customize the event prefix for events that are forwarded through the + * collection view. + */ + childViewEventPrefix?: string | false; - } + /** + * Use the childViewEvents attribute to map child events to methods on the + * parent view. + */ + childViewEvents?: Marionette.EventsHash; - class Channel { + /** + * A childViewTriggers hash or method permits proxying of child view events + * without manually setting bindings. The values of the hash should be a + * string of the event to trigger on the parent. + */ + childViewTriggers?: Marionette.EventsHash; - constructor(channelName: string); + /** + * Bind to events that occur on attached collections. + */ + collectionEvents?: Marionette.EventsHash; - vent: Backbone.Wreqr.EventAggregator; - reqres: Backbone.Wreqr.RequestResponse; - commands: Backbone.Wreqr.Commands; - channelName: string; + /** + * Bind to events that occur on attached models. + */ + modelEvents?: Marionette.EventsHash; - reset(): Channel; - connectEvents(hash: string, context: any): Channel; - connectCommands(hash: string, context: any): Channel; - connectRequests(hash: string, context: any): Channel; + /** + * The view triggers attribute binds DOM events to Marionette View events + * that can be responded to at the view or parent level. + */ + triggers?: Marionette.EventsHash; - } + /** + * Name parts of your template to be used + * throughout the view with the ui attribute. + */ + ui?: any; +} - class Handlers extends Backbone.Events { +interface ViewMixin extends DomMixin, CommonMixin { + supportsRenderLifecycle: any; + supportsDestroyLifecycle: any; + isDestroyed: any; + isRendered: any; + isAttached: any; + delegateEvents: any; + getTriggers: any; + delegateEntityEvents: any; + undelegateEntityEvents: any; + destroy: any; + bindUIElements: any; + unbindUIElements: any; + childViewEventPrefix: any; + triggerMethod: any; +} - constructor(options?: any); +interface RegionsMixin { + regionClass: any; + addRegion: any; + addRegions: any; + removeRegion: any; + removeRegions: any; + emptyRegions: any; + hasRegion: any; + getRegion: any; + getRegions: any; + showChildView: any; + detachChildView: any; + getChildView: any; +} - options: any; +declare class Container { + /** + * Find a view by it's cid. + */ + findByCid(cid: string): TView; - setHandler(name: string, handler: any, context?: any): void; - hasHandler(name: string): boolean; - getHandler(name: string): Function; - removeHandler(name: string): void; - removeAllHandlers(): void; - } + /** + * Find a view by model. + */ + findByModel(model: TModel): TView; - class CommandStorage { + /** + * Find a view by model cid. + */ + findByModelCid(modelCid: string): TView; - constructor(options?: any); + /** + * Find by custom key. + */ + findByCustom(key: string): TView; - getCommands(commandName: string): Commands; - addCommand(commandName: string, args: any): void; - clearCommands(commandName: string): void; - } + /** + * Find by numeric index (unstable). + */ + findByIndex(index: number): TView; - class Commands extends Handlers { + /** + * Find a view by it's cid. + */ + add(view: TView, customIndex?: number): void; - constructor(options?: any); - - storageType: CommandStorage; - execute(name: string, ...args: any[]): void; - } - - class RequestResponse extends Handlers { - - constructor(options?: any); - - request(...args: any[]): any; - } - - class EventAggregator extends Backbone.Events { - - constructor(options?: any); - } - } + /** + * Find a view by it's cid. + */ + remove(view: TView): void; } declare namespace Marionette { + /** + * Alias of Backbones extend function. + */ + function extend(properties: any, classProperties?: any): any; + + /** + * Determines whether the passed-in node is a child of the document or not. + */ + function isNodeAttached(el: HTMLElement): boolean; + + /** + * A handy function to pluck certain options and attach them directly to an + * instance. + */ + function mergeOptions(target: any, options: any, keys: any): void; /** * Retrieve an object's attribute either directly from the object, or @@ -139,7 +207,7 @@ declare namespace Marionette { * to both the event and the method, with the exception of the event name not * being passed to the corresponding method. */ - function triggerMethod(name: string, ...args: any[]): any; + function triggerMethod(target: any, name: string, ...args: any[]): any; /** * Invoke triggerMethod on a specific context. @@ -147,50 +215,126 @@ declare namespace Marionette { */ function triggerMethodOn(ctx: any, name: string, ...args: any[]): any; - /** - * Monitor a view's state, and after it has been rendered and shown in the DOM, - * trigger a "dom:refresh" event every time it is re-rendered. - */ - function MonitorDOMRefresh(view: Backbone.View): void; - /** * This method is used to bind a backbone "entity" (collection/model) to methods on a target object. * @param target An object that must have a listenTo method from the EventBinder object. * @param entity The entity (Backbone.Model or Backbone.Collection) to bind the events from. * @param bindings a hash of { "event:name": "eventHandler" } configuration. Multiple handlers can be separated by a space. A function can be supplied instead of a string handler name. */ - function bindEntityEvents(target: any, entity: any, bindings: any): void; + function bindEvents(target: any, entity: any, bindings: any): void; /** - * This method can be used to unbind callbacks from entities' (collection/model) events. It's the opposite of bindEntityEvents + * This method can be used to unbind callbacks from entities' (collection/model) events. It's the opposite of bindEvents * @param target An object that must have a listenTo method from the EventBinder object. * @param entity The entity (Backbone.Model or Backbone.Collection) to bind the events from. * @param bindings a hash of { "event:name": "eventHandler" } configuration. Multiple handlers can be separated by a space. A function can be supplied instead of a string handler name. */ - function unbindEntityEvents(target: any, entity: any, bindings: any): void; + function unbindEvents(target: any, entity: any, bindings: any): void; - class Callbacks { - add(callback: Function, contextOverride: any): void; - run(options: any, context: any): void; - reset(): void; + /** + * This method is used to bind a radio requests to methods on a target + * object. + */ + function bindRequests(target: any, channel: Radio.Channel, bindings: any): void; + + /** + * This method is used to unbind a radio requests to methods on a target + * object. + */ + function unbindRequests(target: any, channel: Radio.Channel, bindings: any): void; + + /** + * Receives a hash of event names and functions and/or function names, and + * returns the same hash with the function names replaced with the function + * references themselves. + */ + function normalizeMethods(target: any, hash: any): T; + + /** + * Allows you to run multiple instances of Marionette in the same + * application. + */ + function noConflict(): void; + + /** + * Overrides Backbone.EventsHash as JQueryEventObject is deprecated and + * doesn't allow you to set the event target + */ + interface EventsHash extends Backbone.EventsHash { + [selector: string]: string | ((eventObject: JQuery.Event) => void); + } + + interface ObjectOptions extends RadioMixinOptions { + /** + * Initialize is called immediately after the Object has been instantiated, + * and is invoked with the same arguments that the constructor received. + */ + initialize?(options?: ObjectOptions): void; + + [index: string]: any; } /** * A base class which other classes can extend from. Object incorporates many * backbone conventions and utilities like initialize and Backbone.Events. */ - class Object extends Backbone.Events { + class Object extends Backbone.Events implements CommonMixin, RadioMixin { + constructor(options?: ObjectOptions); /** - * Defines the Radio channel that will be used for the requests and/or events + * Receives a hash of event names and functions and/or function names, + * and returns the same hash with the function names replaced with the + * function references themselves. */ - channelName: string; + normalizeMethods(hash: any): T; + + /** + * A handy function to pluck certain options and attach them directly + * to an instance. + */ + mergeOptions(options: any, keys: any): void; + + /** + * Retrieve an object's attribute either directly from the object, or from + * the object's this.options, with this.options taking precedence. + * @param optionName the name of the option to retrieve. + */ + getOption(optionName: string): any; + + /** + * This method is used to bind a backbone "entity" (collection/model) to + * methods on a target object. + */ + bindEvents(entity: any, bindings: any): void; + + /** + * This method can be used to unbind callbacks from entities' + * (collection/model) events. + */ + unbindEvents(entity: any, bindings: any): void; /** * Returns a Radio.Channel instance using 'channelName' */ getChannel(): Backbone.Radio.Channel; + /** + * This method is used to bind a radio requests to methods on a target + * object. + */ + bindRequests(channel: Radio.Channel, bindings: any): void; + + /** + * This method is used to unbind a radio requests to methods on a target + * object. + */ + unbindRequests(channel: Radio.Channel, bindings: any): void; + + /** + * Defines the Radio channel that will be used for the requests and/or events + */ + channelName: string; + /** * Defines an events hash with the events to be listened and its respective handlers */ @@ -201,18 +345,16 @@ declare namespace Marionette { */ radioRequests: any; + /** + * Check if this Oject has been destroyed. + */ + isDestroyed(): boolean; + /** * Initialize is called immediately after the Object has been instantiated, * and is invoked with the same arguments that the constructor received. */ - initialize(options?: any): void; - - /** - * Retrieve an object's attribute either directly from the object, or from - * the object's this.options, with this.options taking precedence. - * @param optionName the name of the option to retrieve. - */ - getOption(optionName: string): any; + initialize(options?: ObjectOptions): void; /** * Objects have a destroy method that unbind the events that are directly @@ -223,436 +365,92 @@ declare namespace Marionette { * onBeforeDestroy. */ destroy(...args: any[]): void; - } - - /** - * A Controller is an object used in the Marionette Router. Controllers are - * where you store your Router's callbacks. - */ - class Controller extends Backbone.Events { - /** - * @param options Options that should be stored in this options. Can be retreived via - * getOption. - */ - constructor(options?: any); /** - * Handles unbinding all of the events that are directly attached to the - * controller instance, as well as those that are bound using the - * EventBinder from the controller. - * - * Invoking the destroy method will trigger the "before:destroy" and - * "destroy" events and the corresponding onBeforeDestory and onDestroy - * method calls. These calls will be passed any arguments destroy was - * invoked with. + * Trigger an event and a corresponding method on the target object. + * All arguments that are passed to the triggerMethod call are passed + * along to both the event and the method, with the exception of the + * event name not being passed to the corresponding method. */ - destroy(...args: any[]): void; - - /** - * Retrieve an object's attribute either directly from the object, or from - * the object's this.options, with this.options taking precedence. - * @param optionName the name of the option to retrieve. - */ - getOption(optionName: string): any; - triggerMethod(name: string, ...args: any[]): any; } - interface RegionConstructionOptions { - /** - * Specifies the element for the region to manage. This may be - * a selector string, a raw DOM node reference or a jQuery wrapped - * DOM node. - */ - el?: any; - } - - interface RegionShowOptions { - /** - * If you replace the current view with a new view by calling show, by - * default it will automatically destroy the previous view. You can - * prevent this behavior by setting this option to true. - */ - preventDestroy?: boolean; - - /** - * If you re-call show with the same view, by default nothing will happen - * because the view is already in the region. You can force the view to be - * re-shown by setting this option to true. - */ - forceShow?: boolean; - - /** - * Regions that are attached to the document when you execute show are - * special in that the views that they show will also become attached - * to the document. These regions fire a pair of triggerMethods on all - * of the views that are about to be attached � even the nested ones. - * This can cause a performance issue if you're rendering hundreds or - * thousands of views at once. - * If you think these events might be causing some lag in your app, you - * can selectively turn them off with the triggerBeforeAttach - * and triggerAttach properties. - */ - triggerBeforeAttach?: boolean; - - /** - * Regions that are attached to the document when you execute show are - * special in that the views that they show will also become attached - * to the document. These regions fire a pair of triggerMethods on all - * of the views that are about to be attached � even the nested ones. - * This can cause a performance issue if you're rendering hundreds or - * thousands of views at once. - * If you think these events might be causing some lag in your app, you - * can selectively turn them off with the triggerBeforeAttach - * and triggerAttach properties. - */ - triggerAttach?: boolean; - } - - interface RegionEmptyOptions { - /** - * If you would like to prevent the view currently shown in the region - * from being destroyed you can set this option to true to prevent the - * default destroy behavior. - */ - preventDestroy?: boolean; - } - - /** - * Regions provide consistent methods to manage, show and destroy views in - * your applications and layouts. They use a jQuery selector to show your - * views in the correct place. - */ - class Region extends Marionette.Object { - - /** - * Build an instance of a region by passing in a configuration object and - * a default region class to use if none is specified in the config. - * The config object should either be a string as a jQuery DOM selector, - * a Region class directly, or an object literal that specifies a selector, - * a custom regionClass, and any options to be supplied to the region - */ - static buildRegion(regionConfig: any, defaultRegionType: any): Region; - - /** - * You can specify an el for the region to manage at the time the region - * is instantiated. - */ - constructor(options?: RegionConstructionOptions); - - /** - * Contains the element that this region should manage. - */ - el: any; - - /** - * Renders and displays the specified view in this region. - * @param view the view to display. - */ - show(view: Backbone.View, options?: RegionShowOptions): void; - - /** - * Attaches an existing view to a region, without rendering or showing the view, - * and without replacing the HTML content of the region. - */ - attachView(view: Backbone.View, options?: RegionShowOptions): any; - - /** - * Override this method to change how the new view is - * appended to the `$el` that the region is managing - */ - attachHtml(view: Backbone.View): void; - - /** - * A region can be reset at any time. This destroys any existing view - * being displayed, and deletes the cached el. The next time the region - * shows a view, the region's el is queried from the DOM. - */ - reset(): any; - - /** - * If you wish to check whether a region has a view, you can use the hasView function. This will return a boolean value depending whether or not the region is showing a view. - */ - hasView(): boolean; - - /** - * Empties the current view from the region. - */ - empty(options?: RegionEmptyOptions): any; - - /** - * @returns view that this region has. - */ - currentView: Backbone.View; - } - - interface RegionDefaults { - /** - * A selector string indicating which element to assign the region two. - */ - selector?: string; - - /** - * A selector string, a jQuery object, or an HTML node indicating which element - * the region should use. - */ - el?: any; - - /** - * A custom region class. - */ - regionClass?: any; - - /** - * Ordinarily regions enforce the presence of a backing DOM element. In - * some instances it may be desirable to allow regions to be instantiated - * and used without an element, such as when regions defined by a parent - * LayoutView class are used by only some of its subclasses. In these - * instances, the region can be defined with this option set to true, - * suppressing the missing element error and causing show calls to the - * region to be treated as no-ops. - */ - allowMissingEl?: boolean; - } - - /** - * Region managers provide a consistent way to manage a number of Marionette.Region - * objects within an application. The RegionManager is intended to be used by - * other objects, to facilitate the addition, storage, retrieval, and removal of - * regions from that object. - */ - class RegionManager extends Controller { - - /** - * Constructor. - * @param options May contain an optional `regions` option. These regions - * are passed directly into addRegions for this instance. - */ - constructor(options?: any); - - /** - * Adds one or more regions to this RegionManager instance. - * @param regionDefinitions a function returning an object literal with the region definitions. The function will - * be called with the RegionManager instance context and all the arguments passed to addRegions. - * @param defaults Specifies default options that will be applied to every region added. - * @returns an object literal with all the created regions. - */ - addRegions(regionDefinitions: Function, defaults?: RegionDefaults): any; - - /** - * Adds one or more regions to this RegionManager instance. - * @param regionDefinitions an object literal containing region names as keys and region - * definitions as values. - * @param defaults Specifies default options that will be applied to every region added. - * @returns an object literal with all the created regions. - */ - addRegions(regionDefinitions: { [regionName: string]: any }, defaults?: RegionDefaults): any; - - /** - * Adds a region to this RegionManager. - * @param name the region name. - * @param definition the region definition. This may be a selector, object literal - * with various region creation options or an instance of a region object. - */ - addRegion(name: string, definition: any): Region; - - /** - * Gets the region with the specified name from this RegionManager. - */ - get(name: string): Region; - - /** - * Removes the region with the specified name from this RegionManager. - */ - removeRegion(name: string): void; - - /** - * Removes all regions from the RegionManager. - */ - removeRegions(): void; - - /** - * Empties all regions from the RegionManager instance. - */ - emptyRegions(): void; - - /** - * Destroys the RegionManager instance entierly which both destroys and - * removes all regions from the RegionManager instance. - */ - destroy(): void; - - //mixins from Collection (copied from Backbone's Collection declaration) - - /** - * Returns true if all of the values in the list pass the predicate truth test. - * @alias every - */ - all(iterator: (element: Region, index: number) => boolean, context?: any): boolean; - - /** - * Returns true if any of the values in the list pass the predicate truth test. Short-circuits and stops traversing the list if a true element is found. - */ - any(iterator: (element: Region, index: number) => boolean, context?: any): boolean; - - /** - * Returns true if the value is present in the list. - * @alias include - */ - contains(value: any): boolean; - - /** - * Looks through each value in the list, returning the first one that passes a truth test (predicate), or undefined if no value passes the test.The function returns as soon as it finds an acceptable element, and doesn't traverse the entire list. - * @alias find - */ - detect(iterator: (item: any) => boolean, context?: any): any; - - /** - * Iterates over the regions in this instance, yielding each in turn to an - * iterator function. The iterator is bound to the context object, if one - * is passed. - * @alias forEach - */ - each(iterator: (element: Region, index: number, list?: any) => void, context?: any): void; - - /** - * Returns true if all of the values in the list pass the predicate truth test. - * @alias all - */ - every(iterator: (element: Region, index: number) => boolean, context?: any): boolean; - - /** - * Looks through each Region in the collection, returning an array of all - * the values that pass a truth test (predicate). - * @alias select - */ - filter(iterator: (element: Region, index: number) => boolean, context?: any): Region[]; - - /** - * Looks through each Region in this instance, returning the first one that passes a truth test (predicate), or undefined if no value passes the test.The function returns as soon as it finds an acceptable element, and doesn't traverse the entire list. - * @alias detect - */ - find(iterator: (element: Region, index: number) => boolean, context?: any): Region; - - /** - * Returns the first Region of this RegionManager. - */ - first(): Region; - - /** - * Returns the first n Regions of this RegionManager. - */ - first(n: number): Region[]; - - /** - * Iterates over the regions in this instance, yielding each in turn to an - * iterator function. The iterator is bound to the context object, if one - * is passed. - * @alias each - */ - forEach(iterator: (element: Region, index: number, list?: any) => void, context?: any): void; - - /** - * Returns true if the value is present in the list. - * @alias contains - */ - include(value: any): boolean; - - /** - * Returns everything but the last n Regions of this instance. - * @param n if specified determines the number of regions to exclude, - * otherwise only the last element is excluded. - */ - initial(n: number): Region[]; - - /** - * Calls the method named by methodName on each value in the collection. Any extra - * arguments passed to invoke will be forwarded on to the method invocation. - */ - invoke(methodName: string, args?: any[]): any; - - /** - * Returns true if the RegionManager contains no regions. - */ - isEmpty(object: any): boolean; - - /** - * Returns the last element of a collection. - */ - last(): Region; - - /** - * Returns the last n elements of the collection. - */ - last(n: number): Region[]; - - /** - * Returns the index of the last occurrence of element in the collection, or -1 if - * element is not present. - * @param fromIndex if specified starts the search at the given index. - */ - lastIndexOf(element: Region, fromIndex?: number): number; - - /** - * Produces a new array of values by mapping each value in the collection through a - * transformation function (iterator). - * @alias collect - */ - map(iterator: (element: Region, index: number, context?: any) => any[], context?: any): any[]; - - /** - * Pluck an attribute from each model in the collection. Equivalent to - * calling map and returning a single attribute from the iterator. - */ - pluck(attribute: string): any[]; - - /** - * Returns the values in the collection without the elements that the truth test - * (predicate) passes. The opposite of filter. - */ - reject(iterator: (element: Region, index: number) => boolean, context?: any): Region[]; - - /** - * Returns the rest of the elements of the collection. - * Pass an index to return the values of the array from that index onward. If not - * specified the first item in the collection is dropped. - * @alias tail, drop - */ - rest(n: number): Region[]; - - /** - * Looks through each value in the collection, returning an array of all - * the values that pass a truth test (predicate). - * @alias filter - */ - select(iterator: any, context?: any): Region[]; - - /** - * Returns true if any of the values in the list pass the predicate truth test. Short-circuits and stops traversing the list if a true element is found. - * @alias any - */ - some(iterator: (element: Region, index: number) => boolean, context?: any): boolean; - - /** - * Creates an array containing the regions in this instance. - */ - toArray(): Region[]; - - /** - * Returns an array of all the regions in the RegionManager except the ones specified. - */ - without(...values: any[]): Region[]; - } - /** * The TemplateCache provides a cache for retrieving templates from script blocks * in your HTML. This will improve the speed of subsequent calls to get a template. */ - class TemplateCache { + class TemplateCache implements DomMixin { /** - * To use the TemplateCache, call the get method on TemplateCache directly. Internally, instances of the TemplateCache class will be created and stored but you do not have to manually create these instances yourself. get will return a compiled template function. + * Returns a new HTML DOM node instance. The resulting node can be + * passed into the other DOM functions. */ - static get(templateId: string): any; + createBuffer(): DocumentFragment; + + /** + * Takes the DOM node el and appends the rendered children to the end of + * the element's contents. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param children is jQuery.append argument: http://api.jquery.com/append/ + */ + appendChildren(el: any, children: any): void; + + /** + * Add sibling to the DOM immediately before the DOM node el. The + * sibling will be at the same level as el. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param sibling is jQuery.before argument: http://api.jquery.com/before/ + */ + beforeEl(el: any, sibling: any): void; + + /** + * Remove oldEl from the DOM and put newEl in its place. + */ + replaceEl(newEl: HTMLElement, oldEL: HTMLElement): void; + + /** + * Remove the inner contents of el from the DOM while leaving el itself + * in the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + detachContents(el: any): void; + + /** + * Replace the contents of el with the HTML string of html. Unlike other + * DOM functions, this takes a literal string for its second argument. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param html is a jQuery.html argument: https://api.jquery.com/html/ + */ + setInnerContent(el: any, html: string): void; + + /** + * Detach el from the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + detachEl(el: any): void; + + /** + * Remove el from the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + removeEl(el: any): void; + + /** + * Lookup the selector string within the DOM node for context. The + * optional context argument will come in as a DOM Node reference to run + * the selector search. If context hasn't been set, then findEls should + * search the entire document for the selector. + * @param selector is a jQuery argument: https://api.jquery.com/jQuery/ + * @param context is a jQuery argument: https://api.jquery.com/jQuery/ + */ + findEls(selector: any, context: any): void; + + /** + * To use the TemplateCache, call the get method on TemplateCache + * directly. Internally, instances of the TemplateCache class will be + * created and stored but you do not have to manually create these + * instances yourself. get will return a compiled template function. + */ + static get(templateId: string, options?: any): any; /** * You can clear one or more, or all items from the cache using the clear @@ -662,27 +460,238 @@ declare namespace Marionette { */ static clear(...templateId: string[]): void; + /** + * Initial method to load the template. (undocumented) + */ + load(options?: any): any; + /** * The default template retrieval is to select the template contents from the * DOM using jQuery. If you wish to change the way this works, you can * override this method on the TemplateCache object. + * Note that the options argument seems to be unused in the source. */ - loadTemplate(templateId: string): any; + loadTemplate(templateId: string, options?: any): any; /** - * he default template compilation passes the results from loadTemplate to + * The default template compilation passes the results from loadTemplate to * the compileTemplate function, which returns an underscore.js compiled * template function. When overriding compileTemplate remember that it * must return a function which takes an object of parameters and values * and returns a formatted HTML string. */ - compileTemplate(rawTemplate: any): any; + compileTemplate(rawTemplate: any, options?: any): any; + } + + interface RegionConstructionOptions { + /** + * Specifies the element for the region to manage. This may be + * a selector string, a raw DOM node reference or a jQuery wrapped + * DOM node. + */ + el?: any; + + /** + * Prevents error on missing element. (undocumented) + */ + allowMissingEl?: boolean; + + /** + * Element to use as context when finding el via jQuery. Defaults to the + * the document. (undocumented) + */ + parentEl?: string; + + /** + * Overwrite the parent el of the region with the rendered contents of + * the inner View. + */ + replaceElement?: string; + } + + interface RegionViewOptions { + /** + * DEPRECATED: If you replace the current view with a new view by calling show, by + * default it will automatically destroy the previous view. You can + * prevent this behavior by setting this option to true. + */ + preventDestroy?: boolean; } /** - * The Renderer object was extracted from the ItemView rendering process, in - * order to create a consistent and re-usable method of rendering a template - * with or without data. + * Regions provide consistent methods to manage, show and destroy views in + * your applications and layouts. They use a jQuery selector to show your + * views in the correct place. + */ + class Region extends Object implements DomMixin { + /** + * Returns a new HTML DOM node instance. The resulting node can be + * passed into the other DOM functions. + */ + createBuffer(): DocumentFragment; + + /** + * Takes the DOM node el and appends the rendered children to the end of + * the element's contents. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param children is jQuery.append argument: http://api.jquery.com/append/ + */ + appendChildren(el: any, children: any): void; + + /** + * Add sibling to the DOM immediately before the DOM node el. The + * sibling will be at the same level as el. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param sibling is jQuery.before argument: http://api.jquery.com/before/ + */ + beforeEl(el: any, sibling: any): void; + + /** + * Remove oldEl from the DOM and put newEl in its place. + */ + replaceEl(newEl: HTMLElement, oldEL: HTMLElement): void; + + /** + * Remove the inner contents of el from the DOM while leaving el itself + * in the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + detachContents(el: any): void; + + /** + * Replace the contents of el with the HTML string of html. Unlike other + * DOM functions, this takes a literal string for its second argument. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param html is a jQuery.html argument: https://api.jquery.com/html/ + */ + setInnerContent(el: any, html: string): void; + + /** + * Detach el from the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + detachEl(el: any): void; + + /** + * Remove el from the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + removeEl(el: any): void; + + /** + * Lookup the selector string within the DOM node for context. The + * optional context argument will come in as a DOM Node reference to run + * the selector search. If context hasn't been set, then findEls should + * search the entire document for the selector. + * @param selector is a jQuery argument: https://api.jquery.com/jQuery/ + * @param context is a jQuery argument: https://api.jquery.com/jQuery/ + */ + findEls(selector: any, context: any): void; + + /** + * You can specify an el for the region to manage at the time the region + * is instantiated. + */ + constructor(options?: RegionConstructionOptions); + + /** + * Defaults to 'mnr' (undocumented) + */ + cidPrefix: string; + + /** + * Overwrite the parent el of the region with the rendered contents of + * the inner View. + */ + replaceElement: boolean; + + /** + * Contains the element that this region should manage. + */ + el: any; + + /** + * Renders and displays the specified view in this region. + * @param view the view to display. + */ + show(view: Backbone.View, options?: RegionViewOptions): void; + + /** + * Override this method to change how the region finds the DOM element + * that it manages. Return a jQuery selector object scoped to a provided + * parent el or the document if none exists. (undocumented) + */ + getEl(): any; + + /** + * Check to see if the region’s el was replaced. (undocumented) + */ + isReplaced(): boolean; + + /** + * Check to see if a view is being swapped by another. + */ + isSwappingView(): boolean; + + /** + * Override this method to change how the new view is appended to the + * `$el` that the region is managing + */ + attachHtml(view: Backbone.View): void; + + /** + * Destroy the current view, clean up any event handlers and remove it + * from the DOM. When a region is emptied empty events are triggered. + */ + empty(options?: RegionViewOptions): any; + + /** + * Destroys the view taking into consideration if is a View descendant + * or vanilla Backbone view. + */ + destroyView(view: Backbone.View): Backbone.View; + + /** + * Override the region's removeView method to change how and when the + * view is destroyed / removed from the DOM. + */ + removeView(view: Backbone.View): void; + + /** + * Empties the Region without destroying the view, returns the detached + * view. + */ + detachView(): Backbone.View; + + /** + * Override this method to change how the region detaches current + * content. + */ + detachHtml(): void; + + /** + * If you wish to check whether a region has a view, you can use the + * hasView function. This will return a boolean value depending whether + * or not the region is showing a view. + */ + hasView(): boolean; + + /** + * A region can be reset at any time. This destroys any existing view + * being displayed, and deletes the cached el. The next time the region + * shows a view, the region's el is queried from the DOM. + */ + reset(): any; + + /** + * @returns view that this region has. + */ + currentView: Backbone.View; + } + + /** + * Render a template with data by passing in the template selector and the + * data to render. This is the default renderer that is used by Marionette. */ class Renderer { /** @@ -699,257 +708,495 @@ declare namespace Marionette { static render(template: any, data: any): string; } + interface ViewOptions extends Backbone.ViewOptions, ViewMixinOptions { + /** + * The events attribute binds DOM events to actions to perform on the + * view. It takes DOM event key and a mapping to the handler. + */ + events?: EventsHash; + + /** + * If you've created a custom region class, you can use it to define + * your region. + */ + regionClass?: any; + + /** + * Add regions to this View. + */ + regions?: any; + + /** + * Set the template of this View. + */ + template?: any; + + /** + * The templateContext attribute can be used to add extra information to + * your templates + */ + templateContext?: any; + } + /** - * This base view provides some common and core functionality for other views - * to take advantage of. - * Note: The Marionette.View class is not intended to be used directly. It - * exists as a base view for other view classes to be extended from, and to - * provide a common location for behaviors that are shared across all views. + * A View is a view that represents an item to be displayed with a template. + * This is typically a Backbone.Model, Backbone.Collection, or nothing at + * all. Views are also used to build up your application hierarchy - you can + * easily nest multiple views through the regions attribute. */ - class View extends Backbone.View { + class View extends Backbone.View implements ViewMixin, RegionsMixin { + constructor(options?: ViewOptions); - constructor(options?: Backbone.ViewOptions); + events(): EventsHash; /** - * Defines behaviors attached to this view. + * Returns a new HTML DOM node instance. The resulting node can be + * passed into the other DOM functions. */ - behaviors: any; + createBuffer(): DocumentFragment; /** - * Defines `triggers` to forward DOM events to view - * events. `triggers: {"click .foo": "do:foo"}` + * Takes the DOM node el and appends the rendered children to the end of + * the element's contents. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param children is jQuery.append argument: http://api.jquery.com/append/ */ - triggers:{[key:string]:any}; + appendChildren(el: any, children: any): void; /** - * A configuration hash for models. The left side is the event on - * the model, and the right side is the name of the - * method on the view or a function to handle the event. This property - * can also be a function that returns the hash described above. + * Add sibling to the DOM immediately before the DOM node el. The + * sibling will be at the same level as el. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param sibling is jQuery.before argument: http://api.jquery.com/before/ */ - modelEvents: any; + beforeEl(el: any, sibling: any): void; /** - * A configuration hash for collections. The left side is the event on - * the collection, and the right side is the name of the - * method on the view or a function to handle the event. This property - * can also be a function that returns the hash described above. + * Remove oldEl from the DOM and put newEl in its place. */ - collectionEvents: any; + replaceEl(newEl: HTMLElement, oldEL: HTMLElement): void; /** - * In several cases you need to access ui elements inside the view to - * retrieve their data or manipulate them. For example you have a certain - * div element you need to show/hide based on some state, or other ui - * element that you wish to set a css class to it. Instead of having - * jQuery selectors hanging around in the view's code you can define a - * ui hash that contains a mapping between the ui element's name and its - * jQuery selector. Afterwards you can simply access it via - * this.ui.elementName. + * Remove the inner contents of el from the DOM while leaving el itself + * in the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ */ - ui: any; + detachContents(el: any): void; /** - * There may be some cases where you need to change the template that is - * used for a view, based on some simple logic such as the value of a - * specific attribute in the view's model. To do this, you can provide a - * getTemplate function on your views and use this to return the template - * that you need. + * Replace the contents of el with the HTML string of html. Unlike other + * DOM functions, this takes a literal string for its second argument. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + * @param html is a jQuery.html argument: https://api.jquery.com/html/ */ - getTemplate(): any; - + setInnerContent(el: any, html: string): void; /** - * Retrieve an object's attribute either directly from the object, or - * from the object's this.options, with this.options taking precedence. + * Detach el from the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ */ - getOption(optionName:string): T; - - mixinTemplateHelpers(target?: any): any; - configureTriggers(): any; + detachEl(el: any): void; /** - * View implements a destroy method, which is called by the region managers automatically. As part of the implementation. + * Remove el from the DOM. + * @param el is a jQuery argument: https://api.jquery.com/jQuery/ + */ + removeEl(el: any): void; + + /** + * Lookup the selector string within the DOM node for context. The + * optional context argument will come in as a DOM Node reference to run + * the selector search. If context hasn't been set, then findEls should + * search the entire document for the selector. + * @param selector is a jQuery argument: https://api.jquery.com/jQuery/ + * @param context is a jQuery argument: https://api.jquery.com/jQuery/ + */ + findEls(selector: any, context: any): void; + + /** + * Receives a hash of event names and functions and/or function names, + * and returns the same hash with the function names replaced with the + * function references themselves. + */ + normalizeMethods(hash: any): T; + + /** + * A handy function to pluck certain options and attach them directly + * to an instance. + */ + mergeOptions(options: any, keys: any): void; + + /** + * Retrieve an object's attribute either directly from the object, or from + * the object's this.options, with this.options taking precedence. + * @param optionName the name of the option to retrieve. + */ + getOption(optionName: string): any; + + /** + * This method is used to bind a backbone "entity" (collection/model) to + * methods on a target object. + */ + bindEvents(entity: any, bindings: any): void; + + /** + * This method can be used to unbind callbacks from entities' + * (collection/model) events. + */ + unbindEvents(entity: any, bindings: any): void; + + /** + * Internal property. (undocumented) + */ + supportsRenderLifecycle: boolean; + + /** + * Internal property. (undocumented) + */ + supportsDestroyLifecycle: boolean; + + /** + * Check if this View has been destroyed. + */ + isDestroyed(): boolean; + + /** + * Check if this View has been rendered. + */ + isRendered(): boolean; + + /** + * Check if this View is attached to the DOM. + */ + isAttached(): boolean; + + /** + * Overrides Backbone.View.delegateEvents. By default Marionette uses + * this to add handlers for events and triggers. (undocumented) + */ + delegateEvents(eventsArg: any): View; + + /** + * Get the triggers that are currently attached to this view. + * (undocumented) + */ + getTriggers(): EventsHash; + + /** + * Delegate entity events. (undocumented) + */ + delegateEntityEvents(): View; + + /** + * Undelegate entity events. (undocumented) + */ + undelegateEntityEvents(): View; + + /** + * Manually destroy a view by calling the destroy method. The method + * unbinds the UI elements, removes the view and its children from the + * DOM and unbinds the listeners. It also triggers lifecycle events. */ destroy(...args: any[]): View; /** - * In several cases you need to access ui elements inside the view to - * retrieve their data or manipulate them. For example you have a certain - * div element you need to show/hide based on some state, or other ui - * element that you wish to set a css class to it. Instead of having jQuery - * selectors hanging around in the view's code you can define a ui hash - * that contains a mapping between the ui element's name and its jQuery - * selector. Afterwards you can simply access it via this.ui.elementName. - * This functionality is provided via the bindUIElements method. - * Since View doesn't implement the render method, then if you directly - * extend from View you will need to invoke this method from your render - * method. In ItemView and CompositeView this is already taken care of. + * Bind UI elements to this view. By default this is called in the + * render method. (undocumented) */ bindUIElements(): any; + /** + * Bind UI elements from this view. (undocumented) + */ unbindUIElements(): any; + /** + * Customize the event prefix for events that are forwarded through the + * collection view. + */ + childViewEventPrefix: string | false; + + /** + * Trigger an event and a corresponding method on the target object. + * All arguments that are passed to the triggerMethod call are passed + * along to both the event and the method, with the exception of the + * event name not being passed to the corresponding method. + */ triggerMethod(name: string, ...args: any[]): any; /** - * 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. - */ - 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. - */ - onDestroy(): void; - - /** - * When destroying a view, an onBeforeDestroy method will be called, if - * it has been provided, just before the view destroys. It will be passed - * any arguments that destroy was invoked with. - */ - onBeforeDestroy(...args: any[]): void; - - /** - * Called anytime that showing the view in a Region causes it to be - * attached to the document. - */ - onAttach(): void; - - /** - * Triggered right before the view is attached to the document. - */ - onBeforeAttach(): void; - - /** - * Triggered after the view has been rendered, has been shown in the DOM via a Marionette.Region, and has been re-rendered. - * This event / callback is useful for DOM-dependent UI plugins such as jQueryUI or KendoUI. - */ - onDomRefresh(): void; - - /** - * Internal properties extended in Marionette.View. - */ - isDestroyed(): boolean; - isRendered(): boolean; - isAttached(): boolean; - delegateEntityEvents(): View; - supportsRenderLifecycle: boolean; - supportsDestroyLifecycle: boolean; - - /** - * 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. + * Define the region class used for this View. */ regionClass: any; /** - * 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 a region to this View. + */ + addRegion(regionName: string, element: any): any; /** - * Add multiple regions as a {name: definition, name2: def2} object literal. + * Add multiple regions to this View. */ addRegions(regions: any): any; - /** Returns a region from the layout view */ - getRegion(name: string): Region; + /** + * Remove a region from this View. + */ + removeRegion(regionName: string): any; /** - * Removes the region with the specified name. - * @param name the name of the region to remove. + * Remove all regions from this View. */ - 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; + removeRegions(): any; /** - * Show a view into the region specified by `regionName`. + * Empty all regions from this View. */ - showChildView(regionName: string, view: any, options?: RegionShowOptions): void; + emptyRegions(): any; /** - * Get the current view that is shown in the region specified by - * `regionName`. + * Check if this View has a particular region. */ - getChildView(regionName: string): Backbone.View; + hasRegion(regionName: string): any; /** - * Returns all regions from the layout view. The results contains an - * Object hash that has `string`s as keys and `Region`s as values. + * Return a region from this View. */ - getRegions(): {[key: string]: Region}; + getRegion(regionName: string): Region; /** - * You can customize the event prefix for events that are forwarded through - * the layout view with this property. + * Returns all regions from this View. */ - childViewEventPrefix: string; + getRegions(): any; + + /** + * Show a view inside a region. + */ + showChildView(regionName: string, view: any, options?: RegionViewOptions): void; + + /** + * Detach a view from a region. + */ + detachChildView(regionName: string): Backbone.View; + + /** + * Get the view from a region. + */ + getChildView(regionName: string): Backbone.View; + + /** + * The results of this method ared passed to this View's template. By + * default Marionette will attempt to pass either an attached model or + * collection which has been converted to JSON. + */ + serializeData(): any; + + /** + * Method used by this.serializeData to serialize this View's model + * data. + */ + serializeModel(): any; + + /** + * Method used by this.serializeData to serialize this View's collection + * data. + */ + serializeCollection(): any; + + /** + * Rebind this View to a new element. Overriding Backbone.View’s + * setElement to handle if an element was previously defined. + * (undocumented) + */ + setElement(element: any): View; + + /** + * Renders the view. Given a template this method will build your HTML + * from that template, mixing in model information and any extra + * template context. + */ + render(): View; + + /** + * Used to determine which template to use. Override this method to add + * logic for using multiple templates. + */ + getTemplate(): any; + + /** + * Mix in template context methods. Looks for a templateContext + * attribute, which can either be an object literal, or a function that + * returns an object literal. All methods and attributes from this + * object are copies to the object passed in. (undocumented) + */ + mixinTemplateContext(...args: any[]): any; + + /** + * Used to attached the rendered template to this View's element. + */ + attachElContent(html: string): View; + + /** + * Used to set the renderer for this View. The rendere function is + * passed the template and the data and is expected to return an html + * string. By default this is set to use Renderer. + */ + setRenderer(renderer: (template: any, data: any) => string): void; + + /** + * Event that is triggered before this View is rendered. + */ + onBeforeRender(view: View): void; + + /** + * Event that is triggered after this View is rendered. + */ + onRender(view: View): void; + + /** + * Event that is triggered before this View is added to the DOM. + */ + onBeforeAttach(view: View): void; + + /** + * Event that is triggered after this View's element has been added to + * the DOM. + */ + onAttach(view: View): void; + + /** + * Event that is triggered after this View's content has been added to + * the DOM. Is also triggered every time this.render() is called. + */ + onDomRefresh(view: View): void; + + /** + * Event that is triggered before this View is destroyed. + */ + onBeforeDestroy(view: View, ...args: any[]): void; + + /** + * Event that is triggered before this View's element is removed from + * the DOM. + */ + onBeforeDetach(view: View): void; + + /** + * Event that is triggered before this View's content is removed from + * the DOM. + */ + onDomRemove(view: View): void; + + /** + * Event that is triggered after this View's element has been removed + * from the DOM. + */ + onDetach(view: View): void; + + /** + * Event that is triggered after this View is destroyed. + */ + onDestroy(view: View, ...args: any[]): void; + + /** + * Event that is triggered before a Region is added. + */ + onBeforeAddRegion(regionName: string, region: Region): void; + + /** + * Event that is triggered after a Region has been added. + */ + onAddRegion(regionName: string, region: Region): void; + + /** + * Event that is triggered before a Region is removed. + */ + onBeforeRemoveRegion(regionName: string, region: Region): void; + + /** + * Event that is triggered after a Region has been removed. + */ + onRemoveRegion(regionName: string, region: Region): void; + + /** + * Behavior objects to assign to this View. + */ + behaviors: Behavior[] | { [index: string]: typeof Behavior; } | Array<{ + behaviorClass: typeof Behavior; + [index: string]: any; + }>; + + /** + * Bind to events that occur on attached models. + */ + modelEvents: EventsHash; + + /** + * The view triggers attribute binds DOM events to Marionette View events + * that can be responded to at the view or parent level. + */ + triggers: EventsHash; + + /** + * Name parts of your template to be used + * throughout the view with the ui attribute. + */ + ui: any; } - - interface CollectionViewOptions extends Backbone.ViewOptions { + interface CollectionViewOptions< + TModel extends Backbone.Model, + TCollection extends Backbone.Collection = Backbone.Collection + > extends Backbone.ViewOptions, ViewMixinOptions { + /** + * Specify a child view to use. + */ + childView?: (() => typeof Backbone.View) | typeof Backbone.View; /** - * By default the CollectionView will maintain a sorted collection's order - * in the DOM. This behavior can be disabled by specifying {sort: false} - * on initialize. + * Define options to pass to the childView constructor. + */ + childViewOptions?: (() => ViewOptions) | ViewOptions; + + /** + * The events attribute binds DOM events to actions to perform on the + * view. It takes DOM event key and a mapping to the handler. + */ + events?: EventsHash; + + /** + * Prevent some of the underlying collection's models from being + * rendered as child views. + */ + filter?(child?: TModel, index?: number, collection?: TCollection): boolean; + + /** + * Specify a view to use if the collection has no children. + */ + emptyView?: (() => typeof Backbone.View) | typeof Backbone.View; + + /** + * Define options to pass to the emptyView constructor. + */ + emptyViewOptions?: (() => ViewOptions) | ViewOptions; + + /** + * If true when you sort your collection there will be no re-rendering, + * only the DOM nodes will be reordered. + */ + reorderOnSort?: boolean; + + /** + * If false the collection view will not maintain a sorted collection's + * order in the DOM. */ sort?: boolean; /** - * This option is useful when you have performance issues when you - * resort your CollectionView. Without this option, your CollectionView - * will be completely re-rendered, which can be costly if you have a - * large number of elements or if your ChildViews are complex. If this - * option is activated, when you sort your Collection, there will be no - * re-rendering, only the DOM nodes will be reordered. This can be a - * problem if your ChildViews use their collection's index in their - * rendering. In this case, you cannot use this option as you need to - * re-render each ChildView. - * - * If you combine this option with a filter that changes the views that - * are to be displayed, reorderOnSort will be bypassed to render new - * children and remove those that are rejected by the filter. + * Render your collection view's children with a different sort order + * than the underlying Backbone collection. */ - reorderOnSort?: boolean; + viewComparator?: string | ((element: TModel) => number | string) | ((compare: TModel, to?: TModel) => number); // Mirrors Backbone.Collection.comparator } /** @@ -960,174 +1207,177 @@ declare namespace Marionette { * DOM. This behavior can be disabled by specifying {sort: false} on * initialize. */ - class CollectionView> extends View { - constructor(options?: CollectionViewOptions); + class CollectionView, TCollection extends Backbone.Collection = Backbone.Collection> extends View { + constructor(options?: CollectionViewOptions); /** - * Specify a childView in your collection view definition. This must be a - * Backbone view object definition, not an instance. It can be any - * Backbone.View or be derived from Marionette.ItemView + * Specify a child view to use. */ - childView: new (...args:any[]) => TView; + childView: (() => { new(...args: any[]): TView }) | { new(...args: any[]): TView }; /** - * There may be scenarios where you need to pass data from your parent - * collection view in to each of the childView instances. To do this, - * provide a childViewOptions definition on your collection view as an - * object literal. This will be passed to the constructor of your childView - * as part of the options. - * - * You can also specify the childViewOptions as a function, if you need to - * calculate the values to return at runtime. The model will be passed - * into the function should you need access to it when calculating - * childViewOptions. The function must return an object, and the attributes of - * the object will be copied to the childView instance's options. + * Define options to pass to the childView constructor. */ - childViewOptions: any; + childViewOptions: ((model: TModel, index: number) => ViewOptions) | ViewOptions; /** - * You can customize the event prefix for events that are forwarded through - * the collection view. To do this, set the childViewEventPrefix on the - * collection view. + * Prevent some of the underlying collection's models from being + * rendered as child views. */ - childViewEventPrefix: string; + filter: (child?: TModel, index?: number, collection?: TCollection) => boolean; /** - * 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. + * Modify the CollectionView's filter attribute, and renders the new + * ChildViews in a efficient way, instead of rendering the whole DOM + * structure again. */ - childViewEvents: any; + setFilter: (filter: (child?: TModel, index?: number, collection?: TCollection) => boolean, options: { preventRender: boolean }) => void; /** - * When a collection has no children, and you need to render a view other than - * the list of childViews, you can specify an emptyView attribute on your collection - * view. + * Remove a filter from the CollectionView. */ - emptyView: any; + removeFilter: (options: { preventRender: boolean }) => void; /** - * Similar to childView and childViewOptions, there is an emptyViewOptions - * property that will be passed to the emptyView constructor. It can be - * provided as an object literal or as a function. If emptyViewOptions - * aren't provided the CollectionView will default to passing the - * childViewOptions to the emptyView. + * Specify a view to use if the collection has no children. */ - emptyViewOptions: any; + emptyView: (() => { new(...args: any[]): Backbone.View }) | { new(...args: any[]): Backbone.View }; /** - * The CollectionView uses Backbone.BabySitter to store and manage its - * child views. This allows you to easily access the views within the - * collection view, iterate them, find them by a given indexer such as the - * view's model or collection, and more. + * Define options to pass to the emptyView constructor. */ - children: Backbone.ChildViewContainer; + emptyViewOptions: ((model: TModel, index: number) => ViewOptions) | ViewOptions; /** - * The render method of the collection view is responsible for rendering the - * entire collection. It loops through each of the children in the collection - * and renders them individually as an childView. - */ - render(): CollectionView; - - /** - * The addChild method is responsible for rendering the childViews and - * adding them to the HTML for the collectionView instance. It is also - * responsible for triggering the events per ChildView. In most cases you - * should not override this method. - */ - addChild(item: any, ChildView: TView, index: Number): void; - - /** Render the child view */ - renderChildView(view: TView, index: Number): void; - - /** - * When a custom view instance needs to be created for the childView that - * represents a child, override the buildChildView method. This method - * takes three parameters and returns a view instance to be used as the - * child view. - */ - buildChildView(child: any, ItemViewType: any, itemViewOptions: any): TView; - - /** - * Remove the child view and destroy it. This function also updates the indices of - * later views in the collection in order to keep the children in sync with the collection. - */ - removeChildView(view: TView): TView; - - /** - * Determines if the view is empty. If you want to control when the empty - * view is rendered, you can override isEmpty. + * Method used to determine when emptyView is rendered. */ isEmpty(): boolean; /** - * If empty, show the empty view + * The render method of the collection view is responsible for rendering + * the entire collection. It loops through each of the children in the + * collection and renders them individually as an childView. */ - checkEmpty(): void; + render(): CollectionView; /** - * Destroy the child views that this collection view - * is holding on to, if any. This returns destroyed children. + * This method is used move the HTML from the element buffer into the + * collection view's el. */ - destroyChildren(): Backbone.ChildViewContainer; + attachHtml(collectionView: CollectionView, childView: TView, index: number): void; /** - * By default the CollectionView will maintain the order of its collection - * in the DOM. However on occasions the view may need to re-render to make - * this possible, for example if you were to change the comparator on the - * collection. By default CollectionView will call render when this happens, - * but there are cases where this may not be suitable. For instance when - * sorting the children in a CompositeView, you want to only render the - * internal collection. + * When overriding attachHtml it may be necessary to also override how + * the buffer is attached. */ - resortView(): void; + attachBuffer(collectionView: CollectionView, buffer: DocumentFragment): void; /** - * By default the collection view will append the HTML of each ChildView - * into the element buffer, and then call jQuery's .append once at the end - * to move the HTML into the collection view's el. - * You can override this by specifying an attachHtml method in your view - * definition. - * @param collectionView the instance of the collection view that will receive the HTML. - * @param childView the current child view instance. - * @param index he index of the model that this childView instance represents, - * in the collection that the model came from. This is useful for sorting - * a collection and displaying the sorted list in the correct order on the - * screen. + * Customize the event prefix for events that are forwarded through the + * collection view. */ - attachHtml(collectionView: CollectionView, childView: TView, index: number): void; - - /** Serialize a collection by serializing each of its models. */ - serializeCollection(): any; + childViewEventPrefix: string | false; /** - * Reorder DOM after sorting. When your element's rendering - * do not use their index, you can pass reorderOnSort: true - * to only reorder the DOM after a sort instead of rendering - * all the collectionView + * Use the childViewEvents attribute to map child events to methods on the + * parent view. + */ + childViewEvents: EventsHash; + + /** + * A childViewTriggers hash or method permits proxying of child view events + * without manually setting bindings. The values of the hash should be a + * string of the event to trigger on the parent. + */ + childViewTriggers: EventsHash; + + /** + * Bind to events that occur on attached collections. + */ + collectionEvents: EventsHash; + + /** + * Bind to events that occur on attached models. + */ + modelEvents: EventsHash; + + /** + * The view triggers attribute binds DOM events to Marionette View events + * that can be responded to at the view or parent level. + */ + triggers: EventsHash; + + /** + * If true when you sort your collection there will be no re-rendering, + * only the DOM nodes will be reordered. + */ + reorderOnSort: boolean; + + /** + * If reorderOnSort is set to true, this function will be used instead + * of re-rendering all children. */ reorder(): void; /** - * Render and show the emptyView. Similar to addChild method - * but "add:child" events are not fired, and the event from - * emptyView are not forwarded + * By default the CollectionView will maintain the order of its + * collection in the DOM. However on occasions the view may need to + * re-render to make this possible, for example if you were to change + * the comparator on the collection. The CollectionView will re-render + * its children or reorder them depending on reorderOnSort. */ - addEmptyView(child: TModel, EmptyView: new (...args: any[]) => any): void; + resortView(): void; /** - * Handle cleanup and other destroying needs for the collection of views + * Render your collection view's children with a different sort order + * than the underlying Backbone collection. */ - destroy(): CollectionView; + viewComparator: string | ((element: TModel) => number | string) | ((compare: TModel, to?: TModel) => number); // Mirrors Backbone.Collection.comparator /** - * Set up the child view event forwarding. Uses a "childview:" - * prefix in front of all forwarded events. - * @param view it might be ChildView or EmptyView. + * Override this method to determine which viewComparator to use. */ - proxyChildEvents(view: any): void; + getViewComparator: () => (string | ((element: TModel) => number | string) | ((compare: TModel, to?: TModel) => number)); // Mirrors Backbone.Collection.comparator + + /** + * Behavior objects to assign to this View. + */ + behaviors: Behavior[] | { [index: string]: typeof Behavior; } | Array<{ + behaviorClass: typeof Behavior; + [index: string]: any; + }>; + + /** + * Name parts of your template to be used throughout the view with the + * ui attribute. + */ + ui: any; + + /** + * The CollectionView can store and manage its child views. This allows + * you to easily access the views within the collection view, iterate + * them, find them by a given indexer such as the view's model or + * collection, and more. + */ + children: Container; + + /** + * The buildChildView is responsible for taking the ChildView class and + * instantiating it with the appropriate data. + */ + buildChildView(child: TModel, childViewClass: { new(...args: any[]): TView }, childViewOptions: ViewOptions): void; + + /** + * The addChildView method can be used to add a view that is independent + * of your Backbone.Collection. + */ + addChildView(childView: TView, index: number): void; + + /** + * The removeChildView method is useful if you need to remove a view + * from the CollectionView without affecting the view's collection. + */ + removeChildView(childView: TView): void; /** * Called just prior to rendering the collection view. @@ -1167,151 +1417,137 @@ declare namespace Marionette { * instance has been deleted or removed from the collection. */ onRemoveChild(childView: TView): void; + + /** + * Automatically destroys this Collection's children and cleans up + * listeners. + */ + destroy(...args: any[]): CollectionView; } - interface AppRouterOptions extends Backbone.RouterOptions { + interface AppRoutes { + [index: string]: string; + } + + interface AppRouterOptions { /** - * The appRoutes. + * Define the app routes and the method names on the controller that + * will be called when accessing the routes. */ - appRoutes?: any; + appRoutes?: AppRoutes; /** - * The controller to associate with this router. + * Define the app routes and the method names on the router that will be + * called when accessing the routes. + */ + routes?: AppRoutes; + + /** + * An object that contains the methods specified in appRoutes. */ controller?: any; } /** - * Reduce the boilerplate code of handling route events and then calling a - * single method on another object. Have your routers configured to call - * the method on your object, directly. + * The Marionette AppRouter is typically used to set up your app when the + * user loads a specific endpoint directly. */ class AppRouter extends Backbone.Router { - - /** - * Configure an AppRouter with appRoutes. The route definition - * is passed on to Backbone's standard routing handlers. This means - * that you define routes like you normally would. However, instead of - * providing a callback method that exists on the router, you provide a - * callback method that exists on the controller, which you specify for - * the router instance (see below.) - */ constructor(options?: AppRouterOptions); /** - * You can specify a controller with the multiple routes at runtime with - * this method. However, In this case the current controller of AppRouter - * will not change. - */ - processAppRoutes(controller: any, appRoutes: any): void; - - /** - * Adds an app route at runtime to this instance. It works the same as the - * built-in router.route() call from Backbone's Router, but has all the - * same semantics and behavior of the appRoutes configuration. + * Add an app route at runtime. */ appRoute(route: string, methodName: string): void; + + /** + * Specify a controller with the multiple routes at runtime. This will + * preserve the existing controller as well. + */ + processAppRoutes(controller: any, appRoutes: AppRoutes): void; + + /** + * An object that contains the methods specified in appRoutes. + */ + controller: any; + + /** + * Fires whenever the user navigates to a new route in your application + * that matches a route. + */ + onRoute(name: string, path: string, args: any[]): void; + } + + interface ApplicationOptions extends ObjectOptions { + /** + * Root entry point for the View tree of your Application. + */ + region: string; } /** - * The Backbone.Marionette.Application object is the hub of your composite - * application. It organizes, initializes and coordinates the various pieces - * of your app. It also provides a starting point for you to call into from - * your HTML script block, or directly from your JavaScript files if you - * prefer to go that route. The Application is meant to be instantiated - * directly, although you can extend it to add your own functionality. + * The Application is used to model your Marionette application under a + * single entry point. The application provides: + * - An obvious entry point to your app + * - A clear hook for global events e.g. the AppRouter + * - An interface to let you inject variables from the wider context into + * your app */ - class Application extends Backbone.Events { - - constructor(options?: any); + class Application extends Object { + constructor(options?: ApplicationOptions); /** - * The Event Aggregator is available through this property. It is - * convenient for passively sharing information between pieces of your - * application as events occur. - * Note! To access this application channel from other objects within your - * app you are encouraged to get a handle of the systems through the - * Wreqr API instead of the Application instance itself. + * Root entry point for the View tree of your Application. */ - vent: Backbone.Wreqr.EventAggregator; - - /** - * Commands are used to make any component tell another component to - * perform an action without a direct reference to it. - */ - commands: Backbone.Wreqr.Commands; - - /** - * Request Response is a means for any component to request information - * from another component without being tightly coupled. - */ - reqres: Backbone.Wreqr.RequestResponse; - - submodules: any; - - /** Command execution, facilitated by Backbone.Wreqr.Commands */ - execute(...args: any[]): void; - - /** Request/response, facilitated by Backbone.Wreqr.RequestResponse */ - request(...args: any[]): any; - - /** Deprecated! Initializers, you should use events to manage start-up logic. */ - addInitializer(initializer: any): void; - - /** - * Once you have your application configured, you can kick everything off - * by calling this method. - * @param options This parameter will be passed to each of your initializer functions, as well as the initialize events. This allows you to provide extra configuration for various parts of your app throughout the initialization sequence. - */ - start(options?: any): void; - - /** Root region of the application*/ region: string; - /** Get the root region */ + /** + * Called immediately after the Application has been instantiated, and + * is invoked with the same arguments that the constructor received. + */ + initialize(options: ApplicationOptions): void; + + /** + * Fired just before the application is started. + */ + onBeforeStart(options: ApplicationOptions): void; + + /** + * Fired as part of the application startup. + */ + onStart(options: ApplicationOptions): void; + + /** + * Once you have your application configured, you can kick everything + * off by calling this method. + */ + start(options?: any): void; + + /** + * Return the attached region object for the Application. + */ getRegion(): Region; - /** Show a view in the root region */ - showView(view: Backbone.View): void; - - /** Get the view from the root region*/ - getView(): any; - - module(moduleNames: any, moduleDefinition: any): Module; + /** + * Display View in the region attached to the Application. This runs the + * View lifecycle. + */ + showView(view: View): void; /** - * Called just before the Application starts and before the initializers are executed. + * Return the view currently being displayed in the Application's + * attached region. If the Application is not currently displaying a + * view, this method returns undefined. */ - onBeforeStart(options?: any): void; - - /** - * Called after the Application has started and after the initializers have been executed. - */ - onStart(options?: any): void; - } - - // modules mapped for convenience, but you should probably use TypeScript modules instead - class Module extends Backbone.Events { - - constructor(moduleName: string, app: Application); - - submodules: any; - triggerMethod(name: string, ...args: any[]): any; - - addInitializer(callback: any): void; - addFinalizer(callback: any): void; - start(options?: any): void; - addDefinition(moduleDefinition: any, customArgs: any): any; + getView(): View; } /** - * A Behavior is an isolated set of DOM / user interactions that can be mixed - * into any View or another Behavior. Behaviors allow you to blackbox View - * specific interactions into portable logical chunks, keeping your views - * simple and your code DRY. + * A Behavior provides a clean separation of concerns to your view logic, + * allowing you to share common user-facing operations between your views. */ - class Behavior extends Marionette.Object { - constructor(options?: any, view?: any); + class Behavior extends Object { + constructor(options?: any); options: any; @@ -1327,23 +1563,26 @@ declare namespace Marionette { /** * Any triggers you define on the Behavior will be triggered in response to the appropriate event on the view. */ - triggers: any; + triggers: EventsHash; /** * modelEvents will respond to the view's model events. */ - modelEvents: any; + modelEvents: EventsHash; /** * collectionEvents will respond to the view's collection events. */ - collectionEvents: any; + collectionEvents: EventsHash; /** * The behaviors key allows a behavior to group multiple behaviors * together. */ - behaviors: any; + behaviors: Behavior[] | { [index: string]: typeof Behavior; } | Array<{ + behaviorClass: typeof Behavior; + [index: string]: any; + }>; /** * defaults can be a hash or function to define the default options for @@ -1363,8 +1602,10 @@ declare namespace Marionette { */ $el: JQuery; - /** A reference to the view instance that the behavior is on. */ - view: any; + /** + * The View that this behavior is attached to. + */ + view: View; /** * $ is a direct proxy of the views $ lookup method. @@ -1373,10 +1614,7 @@ declare namespace Marionette { } /** - * Marionette.Behaviors' is a utility class that takes care of glueing your - * behavior instances to their given View. The most important part of this - * class is that you MUST override the class level behaviorsLookup method or - * set the option behaviorClass for things to work properly. + * DEPRECATED */ class Behaviors { /** diff --git a/types/backbone.marionette/tslint.json b/types/backbone.marionette/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/backbone.marionette/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 8aef9daa66..32ad2dcb4b 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -589,8 +589,10 @@ Promise.props({ num: 1, str: Promise.resolve('a') }).then(val => { propsValue = Promise.props(Promise.props({ num: 1, str: Promise.resolve('a') })).then(val => { propsValue = val }); var propsMapValue: Map; -Promise.resolve(new Map>()).props().then(val => { propsMapValue = val }); -Promise.props(new Map>()).then(val => { propsMapValue = val }); +Promise.resolve(new Map()).props().then(val => { propsMapValue = val }); +Promise.resolve(new Map>()).props().then(val => { propsMapValue = val }); +Promise.props(new Map()).then(val => { propsMapValue = val }); +Promise.props(new Map>()).then(val => { propsMapValue = val }); // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/types/bluebird/index.d.ts b/types/bluebird/index.d.ts index 844dad53d4..77327127d1 100644 --- a/types/bluebird/index.d.ts +++ b/types/bluebird/index.d.ts @@ -46,7 +46,7 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { * Promises/A+ `.then()`. Returns a new promise chained from this promise. The new promise will be rejected or resolved dedefer on the passed `fulfilledHandler`, `rejectedHandler` and the state of this promise. */ // Based on PromiseLike.then, but returns a Bluebird instance. - then(onFulfill?: (value: R) => U | Bluebird.Thenable, onReject?: (error: any) => U | Bluebird.Thenable): Bluebird; // For simpler signature help. + then(onFulfill?: (value: R) => U | PromiseLike, onReject?: (error: any) => U | PromiseLike): Bluebird; // For simpler signature help. then(onfulfilled?: ((value: R) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Bluebird; /** @@ -620,7 +620,7 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { /** * Same as calling `Promise.props(thisPromise)`. With the exception that if this promise is bound to a value, the returned promise is bound to that value too. */ - props(this: PromiseLike | V>>): Bluebird>; + props(this: PromiseLike | V>>): Bluebird>; props(this: PromiseLike>): Bluebird; /** @@ -749,12 +749,12 @@ declare class Bluebird implements PromiseLike, Bluebird.Inspection { * * If you pass a `receiver`, the `nodeFunction` will be called as a method on the `receiver`. */ - static promisify(func: (callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): () => Bluebird; - static promisify(func: (arg1: A1, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1) => Bluebird; - static promisify(func: (arg1: A1, arg2: A2, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2) => Bluebird; - static promisify(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3) => Bluebird; - static promisify(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Bluebird; - static promisify(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Bluebird; + static promisify(func: (callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): () => Bluebird; + static promisify(func: (arg1: A1, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1) => Bluebird; + static promisify(func: (arg1: A1, arg2: A2, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2) => Bluebird; + static promisify(func: (arg1: A1, arg2: A2, arg3: A3, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3) => Bluebird; + static promisify(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4) => Bluebird; + static promisify(func: (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, callback: (err: any, result?: T) => void) => void, options?: Bluebird.PromisifyOptions): (arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => Bluebird; static promisify(nodeFunction: Function, options?: Bluebird.PromisifyOptions): Function; /** diff --git a/types/bootstrap.timepicker/index.d.ts b/types/bootstrap.timepicker/index.d.ts index 384d550e57..49283cfde7 100644 --- a/types/bootstrap.timepicker/index.d.ts +++ b/types/bootstrap.timepicker/index.d.ts @@ -1,13 +1,13 @@ // Type definitions for bootstrap.timepicker // Project: https://github.com/jdewit/bootstrap-timepicker -// Definitions by: derikwhittaker +// Definitions by: derikwhittaker , Heather Booker // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// interface TimepickerOptions { - defaultTime?: string|boolean; + defaultTime?: string|boolean|Date; disableFocus?: boolean; disableMousewheel?: boolean; explicitMode?: boolean; diff --git a/types/botvs/tslint.json b/types/botvs/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/botvs/tslint.json +++ b/types/botvs/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/bunnymq/tslint.json b/types/bunnymq/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/bunnymq/tslint.json +++ b/types/bunnymq/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/chai-as-promised/chai-as-promised-tests.ts b/types/chai-as-promised/chai-as-promised-tests.ts index 7e422521aa..2157f0cc3c 100644 --- a/types/chai-as-promised/chai-as-promised-tests.ts +++ b/types/chai-as-promised/chai-as-promised-tests.ts @@ -26,6 +26,7 @@ thenableNum = chai.expect(thenableNum).to.notify(() => console.log('done')); // BDD API (should) thenableNum = thenableNum.should.be.fulfilled; thenableNum = thenableNum.should.eventually.deep.equal(3); +thenableNum = thenableNum.should.eventually.become(3); thenableNum = thenableNum.should.become(3); thenableNum = thenableNum.should.be.rejected; thenableNum = thenableNum.should.be.rejectedWith(Error); diff --git a/types/chai-as-promised/index.d.ts b/types/chai-as-promised/index.d.ts index 0dde8837dd..459758aa55 100644 --- a/types/chai-as-promised/index.d.ts +++ b/types/chai-as-promised/index.d.ts @@ -1,6 +1,10 @@ -// Type definitions for chai-as-promised +// Type definitions for chai-as-promised 7.1.0 // Project: https://github.com/domenic/chai-as-promised/ -// Definitions by: jt000 , Yuki Kokubun , Leonard Thieu +// Definitions by: jt000 , +// Yuki Kokubun , +// Leonard Thieu , +// Mike Lazer-Walker , +// Matt Bishop // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -25,22 +29,25 @@ declare namespace Chai { become(expected: any): PromisedAssertion; fulfilled: PromisedAssertion; rejected: PromisedAssertion; - rejectedWith(expected: any, message?: string | RegExp): PromisedAssertion; + rejectedWith: PromisedThrow; notify(fn: Function): PromisedAssertion; } // Eventually does not have .then(), but PromisedAssertion have. interface Eventually extends PromisedLanguageChains, PromisedNumericComparison, PromisedTypeComparison { // From chai-as-promised - become(expected: PromiseLike): PromisedAssertion; + become(expected: any): PromisedAssertion; fulfilled: PromisedAssertion; rejected: PromisedAssertion; - rejectedWith(expected: any, message?: string | RegExp): PromisedAssertion; + rejectedWith: PromisedThrow; notify(fn: Function): PromisedAssertion; // From chai not: PromisedAssertion; deep: PromisedDeep; + ordered: PromisedOrdered; + nested: PromisedNested; + any: PromisedKeyFilter; all: PromisedKeyFilter; a: PromisedTypeComparison; an: PromisedTypeComparison; @@ -51,6 +58,7 @@ declare namespace Chai { false: PromisedAssertion; null: PromisedAssertion; undefined: PromisedAssertion; + NaN: PromisedAssertion; exist: PromisedAssertion; empty: PromisedAssertion; arguments: PromisedAssertion; @@ -63,20 +71,36 @@ declare namespace Chai { property: PromisedProperty; ownProperty: PromisedOwnProperty; haveOwnProperty: PromisedOwnProperty; + ownPropertyDescriptor: PromisedOwnPropertyDescriptor; + haveOwnPropertyDescriptor: PromisedOwnPropertyDescriptor; length: PromisedLength; lengthOf: PromisedLength; - match(regexp: RegExp | string, message?: string): PromisedAssertion; + match: PromisedMatch; + matches: PromisedMatch; string(string: string, message?: string): PromisedAssertion; keys: PromisedKeys; key(string: string): PromisedAssertion; throw: PromisedThrow; throws: PromisedThrow; Throw: PromisedThrow; - respondTo(method: string, message?: string): PromisedAssertion; + respondTo: PromisedRespondTo; + respondsTo: PromisedRespondTo; itself: PromisedAssertion; - satisfy(matcher: Function, message?: string): PromisedAssertion; - closeTo(expected: number, delta: number, message?: string): PromisedAssertion; + satisfy: PromisedSatisfy; + satisfies: PromisedSatisfy; + closeTo: PromisedCloseTo; + approximately: PromisedCloseTo; members: PromisedMembers; + increase: PromisedPropertyChange; + increases: PromisedPropertyChange; + decrease: PromisedPropertyChange; + decreases: PromisedPropertyChange; + change: PromisedPropertyChange; + changes: PromisedPropertyChange; + extensible: PromisedAssertion; + sealed: PromisedAssertion; + frozen: PromisedAssertion; + oneOf(list: any[], message?: string): PromisedAssertion; } interface PromisedAssertion extends Eventually, PromiseLike { @@ -99,6 +123,8 @@ declare namespace Chai { at: PromisedAssertion; of: PromisedAssertion; same: PromisedAssertion; + but: PromisedAssertion; + does: PromisedAssertion; } interface PromisedNumericComparison { @@ -129,10 +155,28 @@ declare namespace Chai { (constructor: Object, message?: string): PromisedAssertion; } - interface PromisedDeep { - equal: PromisedEqual; + interface PromisedCloseTo { + (expected: number, delta: number, message?: string): PromisedAssertion; + } + + interface PromisedNested { include: PromisedInclude; property: PromisedProperty; + members: PromisedMembers; + } + + interface PromisedDeep { + equal: PromisedEqual; + equals: PromisedEqual; + eq: PromisedEqual; + include: PromisedInclude; + property: PromisedProperty; + members: PromisedMembers; + ordered: PromisedOrdered + } + + interface PromisedOrdered { + members: PromisedMembers; } interface PromisedKeyFilter { @@ -151,6 +195,11 @@ declare namespace Chai { (name: string, message?: string): PromisedAssertion; } + interface PromisedOwnPropertyDescriptor { + (name: string, descriptor: PropertyDescriptor, message?: string): PromisedAssertion; + (name: string, message?: string): PromisedAssertion; + } + interface PromisedLength extends PromisedLanguageChains, PromisedNumericComparison { (length: number, message?: string): PromisedAssertion; } @@ -160,13 +209,21 @@ declare namespace Chai { (value: string, message?: string): PromisedAssertion; (value: number, message?: string): PromisedAssertion; keys: PromisedKeys; + deep: PromisedDeep; + ordered: PromisedOrdered; members: PromisedMembers; + any: PromisedKeyFilter; all: PromisedKeyFilter; } + interface PromisedMatch { + (regexp: RegExp | string, message?: string): PromisedAssertion; + } + interface PromisedKeys { (...keys: string[]): PromisedAssertion; (keys: any[]): PromisedAssertion; + (keys: Object): PromisedAssertion; } interface PromisedThrow { @@ -179,10 +236,22 @@ declare namespace Chai { (constructor: Function, expected?: RegExp, message?: string): PromisedAssertion; } + interface PromisedRespondTo { + (method: string, message?: string): PromisedAssertion; + } + + interface PromisedSatisfy { + (matcher: Function, message?: string): PromisedAssertion; + } + interface PromisedMembers { (set: any[], message?: string): PromisedAssertion; } + interface PromisedPropertyChange { + (object: Object, property: string, message?: string): PromisedAssertion; + } + // For Assert API interface Assert { eventually: PromisedAssert; @@ -198,7 +267,9 @@ declare namespace Chai { export interface PromisedAssert { fail(actual?: any, expected?: any, msg?: string, operator?: string): PromiseLike; + isOk(val: any, msg?: string): PromiseLike; ok(val: any, msg?: string): PromiseLike; + isNotOk(val: any, msg?: string): PromiseLike; notOk(val: any, msg?: string): PromiseLike; equal(act: any, exp: any, msg?: string): PromiseLike; @@ -210,12 +281,26 @@ declare namespace Chai { deepEqual(act: any, exp: any, msg?: string): PromiseLike; notDeepEqual(act: any, exp: any, msg?: string): PromiseLike; + isAbove(val: number, above: number, msg?: string): PromiseLike; + isAtLeast(val: number, atLeast: number, msg?: string): PromiseLike; + isAtBelow(val: number, below: number, msg?: string): PromiseLike; + isAtMost(val: number, atMost: number, msg?: string): PromiseLike; + isTrue(val: any, msg?: string): PromiseLike; isFalse(val: any, msg?: string): PromiseLike; + isNotTrue(val: any, msg?: string): PromiseLike; + isNotFalse(val: any, msg?: string): PromiseLike; + isNull(val: any, msg?: string): PromiseLike; isNotNull(val: any, msg?: string): PromiseLike; + isNaN(val: any, msg?: string): PromiseLike; + isNotNaN(val: any, msg?: string): PromiseLike; + + exists(val: any, msg?: string): PromiseLike; + notExists(val: any, msg?: string): PromiseLike; + isUndefined(val: any, msg?: string): PromiseLike; isDefined(val: any, msg?: string): PromiseLike; @@ -287,10 +372,46 @@ declare namespace Chai { operator(val: any, operator: string, val2: any, msg?: string): PromiseLike; closeTo(act: number, exp: number, delta: number, msg?: string): PromiseLike; + approximately(act: number, exp: number, delta: number, msg?: string): PromiseLike; sameMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + sameDeepMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + sameOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + notSameOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + sameDeepOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + notSameDeepOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + includeOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + notIncludeOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + includeDeepOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + notIncludeDeepOrderedMembers(set1: any[], set2: any[], msg?: string): PromiseLike; includeMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + includeDeepMembers(set1: any[], set2: any[], msg?: string): PromiseLike; + + oneOf(val: any, list: any[], msg?: string): PromiseLike; + + changes(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; + doesNotChange(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; + increases(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; + doesNotIncrease(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; + decreases(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; + doesNotDecrease(modifier: Function, obj: Object, property: string, msg?: string): PromiseLike; ifError(val: any, msg?: string): PromiseLike; + + isExtensible(obj: Object, msg?: string): PromiseLike; + isNotExtensible(obj: Object, msg?: string): PromiseLike; + + isSealed(obj: Object, msg?: string): PromiseLike; + sealed(obj: Object, msg?: string): PromiseLike; + isNotSealed(obj: Object, msg?: string): PromiseLike; + notSealed(obj: Object, msg?: string): PromiseLike; + + isFrozen(obj: Object, msg?: string): PromiseLike; + frozen(obj: Object, msg?: string): PromiseLike; + isNotFrozen(obj: Object, msg?: string): PromiseLike; + notFrozen(obj: Object, msg?: string): PromiseLike; + + isEmpty(val: any, msg?: string): PromiseLike; + isNotEmpty(val: any, msg?: string): PromiseLike; } } diff --git a/types/chai-enzyme/chai-enzyme-tests.tsx b/types/chai-enzyme/chai-enzyme-tests.tsx index 77ad5a0169..4b88d077aa 100644 --- a/types/chai-enzyme/chai-enzyme-tests.tsx +++ b/types/chai-enzyme/chai-enzyme-tests.tsx @@ -30,6 +30,7 @@ expect(wrapper).to.have.ref("test"); expect(wrapper).to.be.selected(); expect(wrapper).to.have.tagName("div"); expect(wrapper).to.have.text(""); +expect(wrapper).to.contain.text(""); expect(wrapper).to.have.type(Test); expect(wrapper).to.have.value("test"); expect(wrapper).to.have.attr("test", "test"); diff --git a/types/chai-enzyme/index.d.ts b/types/chai-enzyme/index.d.ts index 86b6f6f7b3..f1283994f6 100644 --- a/types/chai-enzyme/index.d.ts +++ b/types/chai-enzyme/index.d.ts @@ -26,6 +26,12 @@ declare namespace Chai { * @param code */ (selector: EnzymeSelector): Assertion; + + /** + * Assert that the given wrapper has the supplied text: + * @param str + */ + text(str?: string): Assertion; } interface Assertion { /** diff --git a/types/chai-http/chai-http-tests.ts b/types/chai-http/chai-http-tests.ts index 7c1c7a6b42..f4f65cae7b 100644 --- a/types/chai-http/chai-http-tests.ts +++ b/types/chai-http/chai-http-tests.ts @@ -41,6 +41,16 @@ chai.request(app) .get('/search') .query({ name: 'foo', limit: 10 }); +chai.request(app) + .get('/download') + .buffer() + .parse((res, cb) => { + let data = ''; + res.setEncoding('binary'); + res.on('data', (chunk: any) => { data += chunk; }); + res.on('end', () => { cb(undefined, new Buffer(data, 'binary')); }); + }); + chai.request(app) .put('/user/me') .send({ passsword: '123', confirmPassword: '123' }) diff --git a/types/chai-http/index.d.ts b/types/chai-http/index.d.ts index f0957cc454..6a9404c9da 100644 --- a/types/chai-http/index.d.ts +++ b/types/chai-http/index.d.ts @@ -49,6 +49,8 @@ declare global { type: string; status: number; text: string; + setEncoding(encoding: string): void; + on(event: string, fn: (...args: any[]) => void): void; } interface Request extends FinishedRequest { @@ -59,6 +61,7 @@ declare global { auth(user: string, name: string): Request; field(name: string, val: string): Request; buffer(): Request; + parse(fn: (res: Response, cb: (e?: Error, r?: any) => void) => void): Request; end(callback?: (err: any, res: Response) => void): FinishedRequest; } diff --git a/types/chart.js/index.d.ts b/types/chart.js/index.d.ts index f04fbc1119..607f6924f8 100644 --- a/types/chart.js/index.d.ts +++ b/types/chart.js/index.d.ts @@ -4,15 +4,14 @@ // Fabien Lavocat // KentarouTakeda // Larry Bahr +// Daniel Luz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// - declare class Chart { static readonly Chart: typeof Chart; constructor( - context: string | JQuery | CanvasRenderingContext2D | HTMLCanvasElement | string[] | CanvasRenderingContext2D[] | HTMLCanvasElement[], + context: string | CanvasRenderingContext2D | HTMLCanvasElement | ArrayLike, options: Chart.ChartConfiguration ); config: Chart.ChartConfiguration; @@ -83,6 +82,8 @@ declare namespace Chart { type ScaleType = 'category' | 'linear' | 'logarithmic' | 'time' | 'radialLinear'; + type PointStyle = 'circle' | 'cross' | 'crossRot' | 'dash' | 'line' | 'rect' | 'rectRounded' | 'rectRot' | 'star' | 'triangle'; + type PositionType = 'left' | 'right' | 'top' | 'bottom'; interface ChartArea { @@ -175,7 +176,7 @@ declare namespace Chart { interface ChartTitleOptions { display?: boolean; - position?: string; + position?: PositionType; fullWdith?: boolean; fontSize?: number; fontFamily?: string; @@ -187,10 +188,12 @@ declare namespace Chart { interface ChartLegendOptions { display?: boolean; - position?: string; + position?: PositionType; fullWidth?: boolean; - onClick?(event: any, legendItem: any): void; + onClick?(event: MouseEvent, legendItem: ChartLegendItem): void; + onHover?(event: MouseEvent, legendItem: ChartLegendItem): void; labels?: ChartLegendLabelOptions; + reverse?: boolean; } interface ChartLegendLabelOptions { @@ -293,7 +296,7 @@ declare namespace Chart { interface ChartPointOptions { radius?: number; - pointStyle?: string; + pointStyle?: PointStyle; backgroundColor?: ChartColor; borderWidth?: number; borderColor?: ChartColor; @@ -332,6 +335,7 @@ declare namespace Chart { interface TickOptions { autoSkip?: boolean; + autoSkipPadding?: boolean; callback?(value: any, index: any, values: any): string|number; display?: boolean; fontColor?: ChartColor; @@ -386,7 +390,7 @@ declare namespace Chart { type ChartColor = string | CanvasGradient | CanvasPattern | string[]; interface ChartDataSets { - cubicInterpolationMode?: string; + cubicInterpolationMode?: 'default' | 'monotone'; backgroundColor?: ChartColor | ChartColor[]; borderWidth?: number; borderColor?: ChartColor; @@ -394,10 +398,15 @@ declare namespace Chart { borderDash?: number[]; borderDashOffset?: number; borderJoinStyle?: string; + borderSkipped?: PositionType; data?: number[] | ChartPoint[]; - fill?: boolean; + fill?: boolean | number | string; + hoverBackgroundColor?: string | string[]; + hoverBorderColor?: string | string[]; + hoverBorderWidth?: number | number[]; label?: string; lineTension?: number; + steppedLine?: 'before' | 'after' | boolean; pointBorderColor?: ChartColor | ChartColor[]; pointBackgroundColor?: ChartColor | ChartColor[]; pointBorderWidth?: number | number[]; @@ -407,14 +416,15 @@ declare namespace Chart { pointHoverBackgroundColor?: ChartColor | ChartColor[]; pointHoverBorderColor?: ChartColor | ChartColor[]; pointHoverBorderWidth?: number | number[]; - pointStyle?: string | string[] | HTMLImageElement | HTMLImageElement[]; + pointStyle?: PointStyle | HTMLImageElement | Array; xAxisID?: string; yAxisID?: string; type?: string; hidden?: boolean; hideInLegendAndTooltip?: boolean; + showLine?: boolean; stack?: string; - spanGaps?: string; + spanGaps?: boolean; } interface ChartScales { diff --git a/types/cote/tslint.json b/types/cote/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/cote/tslint.json +++ b/types/cote/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/counterpart/counterpart-tests.ts b/types/counterpart/counterpart-tests.ts new file mode 100644 index 0000000000..db9f1cf5d6 --- /dev/null +++ b/types/counterpart/counterpart-tests.ts @@ -0,0 +1,29 @@ +import * as counterpart from 'counterpart'; + +counterpart('translation.to.be.used'); +counterpart(['translation', 'to', 'be', 'used']); + +counterpart.setSeparator('*'); + +counterpart.onTranslationNotFound((locale: string, key: string, fallback: string, scope: string) => {}); +counterpart.offTranslationNotFound((locale: string, key: string, fallback: string, scope: string) => {}); + +counterpart.setMissingEntryGenerator((value: string) => {}); + +counterpart.setLocale('es'); +counterpart.getLocale(); + +counterpart.onLocaleChange((newLocale: string, oldLocale: string) => {}); +counterpart.offLocaleChange((newLocale: string, oldLocale: string) => {}); + +counterpart.setFallbackLocale('es'); + +counterpart.registerTranslations('es', { hello: 'Hola' }); + +counterpart.registerInterpolations({ library: 'Counterpart' }); + +counterpart.setKeyTransformer((value: string, options: object) => { + return value.toUpperCase(); +}); + +counterpart.localize(new Date(), { format: 'short' }); diff --git a/types/counterpart/index.d.ts b/types/counterpart/index.d.ts new file mode 100644 index 0000000000..f09ad0708c --- /dev/null +++ b/types/counterpart/index.d.ts @@ -0,0 +1,32 @@ +// Type definitions for counterpart 0.18 +// Project: https://github.com/martinandert/counterpart +// Definitions by: santiagodoldan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +type NotFoundHandler = (locale: string, key: string, fallback: string, scope: string) => void; +type LocaleChangeHandler = (newLocale: string, oldLocale: string) => void; + +interface Counterpart { + (key: string|string[], options?: object): string; + + setSeparator(value: string): string; + onTranslationNotFound(callback: NotFoundHandler): void; + offTranslationNotFound(callback: NotFoundHandler): void; + setMissingEntryGenerator(callback: (value: string) => void): void; + getLocale(): string; + setLocale(value: string): string; + onLocaleChange(callback: LocaleChangeHandler): void; + offLocaleChange(callback: LocaleChangeHandler): void; + setFallbackLocale(value: string|string[]): void; + registerTranslations(locale: string, data: object): void; + registerInterpolations(data: object): void; + setKeyTransformer(callback: (value: string, options: object) => string): string; + localize(date: Date, options: object): string; + Instance: Counterpart; + Translator: Counterpart; +} + +declare var counterpart: Counterpart; + +export = counterpart; diff --git a/types/counterpart/tsconfig.json b/types/counterpart/tsconfig.json new file mode 100644 index 0000000000..9f2ad836b7 --- /dev/null +++ b/types/counterpart/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "counterpart-tests.ts" + ] +} diff --git a/types/counterpart/tslint.json b/types/counterpart/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/counterpart/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/cucumber/tslint.json b/types/cucumber/tslint.json index a9ae3a3856..215db37b37 100644 --- a/types/cucumber/tslint.json +++ b/types/cucumber/tslint.json @@ -1,4 +1,8 @@ { "extends": "dtslint/dt.json", - "no-any-union": false + "no-any-union": false, + "rules": { + "no-any-union": false, + "no-unnecessary-generics": false + } } diff --git a/types/cucumber/v1/tslint.json b/types/cucumber/v1/tslint.json index 3db14f85ea..3fe527d08f 100644 --- a/types/cucumber/v1/tslint.json +++ b/types/cucumber/v1/tslint.json @@ -1 +1,7 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-any-union": false, + "no-unnecessary-generics": false + } +} diff --git a/types/cwise-parser/tslint.json b/types/cwise-parser/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/cwise-parser/tslint.json +++ b/types/cwise-parser/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/d3-scale-chromatic/d3-scale-chromatic-tests.ts b/types/d3-scale-chromatic/d3-scale-chromatic-tests.ts index f6b322b74d..ccf736d43b 100644 --- a/types/d3-scale-chromatic/d3-scale-chromatic-tests.ts +++ b/types/d3-scale-chromatic/d3-scale-chromatic-tests.ts @@ -33,6 +33,16 @@ const RdYlBu: string = d3ScaleChromatic.interpolateRdYlBu(0); // rgb(103, 0, 31) const RdYlGn: string = d3ScaleChromatic.interpolateRdYlGn(0); // rgb(103, 0, 31) const Spectral: string = d3ScaleChromatic.interpolateSpectral(0); // rgb(158, 1, 66) +const schemeBrBG: string = d3ScaleChromatic.schemeBrBG[3][0]; // #d8b365 +const schemePRGn: string = d3ScaleChromatic.schemePRGn[3][0]; // #af8dc3 +const schemePiYG: string = d3ScaleChromatic.schemePiYG[3][0]; // #e9a3c9 +const schemePuOr: string = d3ScaleChromatic.schemePuOr[3][0]; // #998ec3 +const schemeRdBu: string = d3ScaleChromatic.schemeRdBu[3][0]; // #ef8a62 +const schemeRdGy: string = d3ScaleChromatic.schemeRdGy[3][0]; // #ef8a62 +const schemeRdYlBu: string = d3ScaleChromatic.schemeRdYlBu[3][0]; // #fc8d59 +const schemeRdYlGn: string = d3ScaleChromatic.schemeRdYlGn[3][0]; // #fc8d59 +const schemeSpectral: string = d3ScaleChromatic.schemeSpectral[3][0]; // #fc8d59 + // ----------------------------------------------------------------------- // Sequential // ----------------------------------------------------------------------- @@ -43,6 +53,13 @@ const Orange: string = d3ScaleChromatic.interpolateOranges(1); // rgb(127, 39, 4 const Purple: string = d3ScaleChromatic.interpolatePurples(1); // rgb(63, 0, 125) const Red: string = d3ScaleChromatic.interpolateReds(1); // rgb(103, 0, 13) +const schemeBlues: string = d3ScaleChromatic.schemeBlues[3][0]; // #deebf7 +const schemeGreens: string = d3ScaleChromatic.schemeGreens[3][0]; // #e5f5e0 +const schemeGreys: string = d3ScaleChromatic.schemeGreys[3][0]; // #f0f0f0 +const schemeOranges: string = d3ScaleChromatic.schemeOranges[3][0]; // #fee6ce +const schemePurples: string = d3ScaleChromatic.schemePurples[3][0]; // #efedf5 +const schemeReds: string = d3ScaleChromatic.schemeReds[3][0]; // #fee0d2 + // ----------------------------------------------------------------------- // Sequential(Multi-Hue) // ----------------------------------------------------------------------- @@ -58,3 +75,16 @@ const YlGnBu: string = d3ScaleChromatic.interpolateYlGnBu(1); // rgb(8, 29, 88) const YlGn: string = d3ScaleChromatic.interpolateYlGn(1); // rgb(0, 69, 41) const YlOrBr: string = d3ScaleChromatic.interpolateYlOrBr(1); // rgb(102, 37, 6) const YlOrRd: string = d3ScaleChromatic.interpolateYlOrRd(1); // rgb(128, 0, 38) + +const schemeBuGn: string = d3ScaleChromatic.schemeBuGn[3][0]; // #e5f5f9 +const schemeBuPu: string = d3ScaleChromatic.schemeBuPu[3][0]; // #e0ecf4 +const schemeGnBu: string = d3ScaleChromatic.schemeGnBu[3][0]; // #e0f3db +const schemeOrRd: string = d3ScaleChromatic.schemeOrRd[3][0]; // #fee8c8 +const schemePuBuGn: string = d3ScaleChromatic.schemePuBuGn[3][0]; // #ece2f0 +const schemePuBu: string = d3ScaleChromatic.schemePuBu[3][0]; // #ece7f2 +const schemePuRd: string = d3ScaleChromatic.schemePuRd[3][0]; // #e7e1ef +const schemeRdPu: string = d3ScaleChromatic.schemeRdPu[3][0]; // #fde0dd +const schemeYlGnBu: string = d3ScaleChromatic.schemeYlGnBu[3][0]; // #edf8b1 +const schemeYlGn: string = d3ScaleChromatic.schemeYlGn[3][0]; // #f7fcb9 +const schemeYlOrBr: string = d3ScaleChromatic.schemeYlOrBr[3][0]; // #fff7bc +const schemeYlOrRd: string = d3ScaleChromatic.schemeYlOrRd[3][0]; // #ffeda0 diff --git a/types/d3-scale-chromatic/index.d.ts b/types/d3-scale-chromatic/index.d.ts index 450d103259..1345371e2a 100644 --- a/types/d3-scale-chromatic/index.d.ts +++ b/types/d3-scale-chromatic/index.d.ts @@ -1,6 +1,9 @@ -// Type definitions for D3JS d3-scale-chromatic module 1.0 +// Type definitions for D3JS d3-scale-chromatic module 1.1 // Project: https://github.com/d3/d3-scale-chromatic/ -// Definitions by: Hugues Stefanski , Alex Ford , Boris Yankov +// Definitions by: Hugues Stefanski , +// Alex Ford , +// Boris Yankov , +// Henrique Machado // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Last module patch version validated against: 1.0.2 @@ -11,35 +14,35 @@ /** * An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemeAccent: string[]; +export const schemeAccent: ReadonlyArray; /** * An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemeDark2: string[]; +export const schemeDark2: ReadonlyArray; /** * An array of twelve categorical colors represented as RGB hexadecimal strings. */ -export const schemePaired: string[]; +export const schemePaired: ReadonlyArray; /** * An array of nine categorical colors represented as RGB hexadecimal strings. */ -export const schemePastel1: string[]; +export const schemePastel1: ReadonlyArray; /** * An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemePastel2: string[]; +export const schemePastel2: ReadonlyArray; /** * An array of nine categorical colors represented as RGB hexadecimal strings. */ -export const schemeSet1: string[]; +export const schemeSet1: ReadonlyArray; /** * An array of eight categorical colors represented as RGB hexadecimal strings. */ -export const schemeSet2: string[]; +export const schemeSet2: ReadonlyArray; /** * An array of twelve categorical colors represented as RGB hexadecimal strings. */ -export const schemeSet3: string[]; +export const schemeSet3: ReadonlyArray; // ----------------------------------------------------------------------- // Diverging @@ -50,48 +53,112 @@ export const schemeSet3: string[]; * @param value Number in the range [0, 1]. */ export function interpolateBrBG(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “BrBG” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeBrBG[9] contains an array of nine strings representing the nine colors of the + * brown-blue-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemeBrBG: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “PRGn” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePRGn(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “PRGn” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePRGn[9] contains an array of nine strings representing the nine colors of the + * purple-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemePRGn: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “PiYG” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePiYG(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “PiYG” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePiYG[9] contains an array of nine strings representing the nine colors of the + * pink-yellow-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemePiYG: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “PuOr” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePuOr(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “PuOr” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePuOr[9] contains an array of nine strings representing the nine colors of the + * purple-orange diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemePuOr: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “RdBu” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateRdBu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “RdBu” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeRdBu[9] contains an array of nine strings representing the nine colors of the + * red-blue diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemeRdBu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “RdGy” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateRdGy(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “RdGy” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeRdGy[9] contains an array of nine strings representing the nine colors of the + * red-grey diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemeRdGy: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “RdYlBu” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateRdYlBu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “RdYlBu” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeRdYlBu[9] contains an array of nine strings representing the nine colors of the + * red-yellow-blue diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemeRdYlBu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “RdYlGn” diverging color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateRdYlGn(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “RdYlGn” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeRdYlGn[9] contains an array of nine strings representing the nine colors of the + * red-yellow-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemeRdYlGn: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “Spectral” diverging color scheme represented as an RGB string. * @@ -99,6 +166,13 @@ export function interpolateRdYlGn(value: number): string; */ export function interpolateSpectral(value: number): string; +/** + * An array of arrays of hexadecimal color strings from the “Spectral” diverging color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeSpectral[9] contains an array of nine strings representing the nine colors of the + * spectral diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. + */ +export const schemeSpectral: ReadonlyArray>; + // ----------------------------------------------------------------------- // Sequential // ----------------------------------------------------------------------- @@ -108,30 +182,70 @@ export function interpolateSpectral(value: number): string; * @param value Number in the range [0, 1]. */ export function interpolateBlues(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “Blues” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeBlues[9] contains an array of nine strings representing the nine colors of the + * blue sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeBlues: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “Greens” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateGreens(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “Greens” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeGreens[9] contains an array of nine strings representing the nine colors of the + * green sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeGreens: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “Greys” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateGreys(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “Greys” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeGreys[9] contains an array of nine strings representing the nine colors of the + * grey sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeGreys: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “Oranges” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateOranges(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “Oranges” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeOranges[9] contains an array of nine strings representing the nine colors of the + * orange sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeOranges: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “Purples” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePurples(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “Purples” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePurples[9] contains an array of nine strings representing the nine colors of the + * purple sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemePurples: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “Reds” sequential color scheme represented as an RGB string. * @@ -139,6 +253,13 @@ export function interpolatePurples(value: number): string; */ export function interpolateReds(value: number): string; +/** + * An array of arrays of hexadecimal color strings from the “Reds” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeReds[9] contains an array of nine strings representing the nine colors of the + * red sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeReds: ReadonlyArray>; + // ----------------------------------------------------------------------- // Sequential(Multi-Hue) // ----------------------------------------------------------------------- @@ -149,69 +270,164 @@ export function interpolateReds(value: number): string; * @param value Number in the range [0, 1]. */ export function interpolateBuGn(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “BuGn” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeBuGn[9] contains an array of nine strings representing the nine colors of the + * blue-green sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeBuGn: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “BuPu” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateBuPu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “BuPu” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeBuPu[9] contains an array of nine strings representing the nine colors of the + * blue-purple sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeBuPu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “GnBu” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateGnBu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “GnBu” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeGnBu[9] contains an array of nine strings representing the nine colors of the + * green-blue sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeGnBu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “OrRd” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateOrRd(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “OrRd” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeOrRd[9] contains an array of nine strings representing the nine colors of the + * orange-red sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeOrRd: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “PuBuGn” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePuBuGn(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “PuBuGn” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePuBuGn[9] contains an array of nine strings representing the nine colors of the + * purple-blue-green sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemePuBuGn: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “PuBu” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePuBu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “PuBu” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePuBu[9] contains an array of nine strings representing the nine colors of the + * purple-blue sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemePuBu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “PuRd” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolatePuRd(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “PuRd” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemePuRd[9] contains an array of nine strings representing the nine colors of the + * purple-red sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemePuRd: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “RdPu” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateRdPu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “RdPu” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeRdPu[9] contains an array of nine strings representing the nine colors of the + * red-purple sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeRdPu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “YlGnBu” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateYlGnBu(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “YlGnBu” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeYlGnBu[9] contains an array of nine strings representing the nine colors of the + * yellow-green-blue sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeYlGnBu: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “YlGn” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateYlGn(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “YlGn” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeYlGn[9] contains an array of nine strings representing the nine colors of the + * yellow-green sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeYlGn: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “YlOrBr” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateYlOrBr(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “YlOrBr” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeYlOrBr[9] contains an array of nine strings representing the nine colors of the + * yellow-orange-brown sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeYlOrBr: ReadonlyArray>; + /** * Given a number t in the range [0,1], returns the corresponding color from the “YlOrRd” sequential color scheme represented as an RGB string. * * @param value Number in the range [0, 1]. */ export function interpolateYlOrRd(value: number): string; + +/** + * An array of arrays of hexadecimal color strings from the “YlOrRd” sequential color scheme. The kth element of this array contains + * the color scheme of size k; for example, d3.schemeYlOrRd[9] contains an array of nine strings representing the nine colors of the + * yellow-orange-red sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. + */ +export const schemeYlOrRd: ReadonlyArray>; diff --git a/types/datatables.net-buttons/datatables.net-buttons-tests.ts b/types/datatables.net-buttons/datatables.net-buttons-tests.ts index 015917c456..3323f6fdb9 100644 --- a/types/datatables.net-buttons/datatables.net-buttons-tests.ts +++ b/types/datatables.net-buttons/datatables.net-buttons-tests.ts @@ -8,10 +8,20 @@ $(document).ready(function () { extend: 'excel', text: 'Excel', className: 'class', + filename: "exported_file.csv", exportOptions: { columns: ':visible' } }, + { + extend: 'excel', + text: 'Excel', + className: 'class', + filename: "exported_file.csv", + exportOptions: { + columns: [1, 6, 2, 3, 4] + } + }, { action: function (e, dt, node, config) { }, available: function (dt, config) { return true; }, diff --git a/types/datatables.net-buttons/index.d.ts b/types/datatables.net-buttons/index.d.ts index a5b32c1bf6..1bdf212b03 100644 --- a/types/datatables.net-buttons/index.d.ts +++ b/types/datatables.net-buttons/index.d.ts @@ -86,6 +86,11 @@ declare namespace DataTables { */ title?: string; + /** + * Define what the exported filename should be + */ + filename?: string; + exportOptions?: ButtonExportOptions; autoPrint?: boolean; customize?: FunctionButtonCustomize; @@ -95,7 +100,7 @@ declare namespace DataTables { (dt: DataTables.Api, config: any): boolean } export interface ButtonExportOptions { - columns?: string; + columns?: string | number | string[] | number[]; } export interface ButtonKey { diff --git a/types/deepmerge/deepmerge-tests.ts b/types/deepmerge/deepmerge-tests.ts index 5467cb83f0..dcd21ff3c3 100644 --- a/types/deepmerge/deepmerge-tests.ts +++ b/types/deepmerge/deepmerge-tests.ts @@ -1,19 +1,29 @@ import * as deepmerge from "deepmerge"; const x = { - foo: { bar: 3 }, - array: [{ does: 'work', too: [1, 2, 3] }] + foo: { bar: 3 }, + array: [{ does: 'work', too: [1, 2, 3] }] }; const y = { - foo: { baz: 4 }, - quux: 5, - array: [{ does: 'work', too: [4, 5, 6] }, { really: 'yes' }] + foo: { baz: 4 }, + quux: 5, + array: [{ does: 'work', too: [4, 5, 6] }, { really: 'yes' }] }; const expected = { - foo: { bar: 3, baz: 4 }, - array: [{ does: 'work', too: [1, 2, 3, 4, 5, 6] }, { really: 'yes' }], - quux: 5 + foo: { bar: 3, baz: 4 }, + array: [{ does: 'work', too: [1, 2, 3, 4, 5, 6] }, { really: 'yes' }], + quux: 5 }; -const result = deepmerge(x, y); +const result = deepmerge(x, y); +const anyResult = deepmerge(x, y); + +function reverseConcat(dest: number[], src: number[]) { + return src.concat(dest); +} + +const withOptions = deepmerge(x, y, { + clone: false, + arrayMerge: reverseConcat +}); diff --git a/types/deepmerge/index.d.ts b/types/deepmerge/index.d.ts index 96d0412aa6..797e52c8a5 100644 --- a/types/deepmerge/index.d.ts +++ b/types/deepmerge/index.d.ts @@ -1,17 +1,20 @@ // Type definitions for deepmerge 1.3 // Project: https://github.com/KyleAMathews/deepmerge // Definitions by: marvinscharle +// syy1125 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 export = deepmerge; -declare function deepmerge(x: T, y: T, options?: deepmerge.Options): T; +declare function deepmerge(x: Partial, y: Partial, options?: deepmerge.Options): T; +declare function deepmerge(x: T1, y: T2, options?: deepmerge.Options): T1 & T2; declare namespace deepmerge { - interface Options { + interface Options { clone?: boolean; - arrayMerge?(destination: T, source: T, options?: Options): T; + arrayMerge?(destination: any[], source: any[], options?: Options): any[]; } - function all(objects: T[], options?: Options): T; + function all(objects: Array>, options?: Options): T; } diff --git a/types/depd/depd-tests.ts b/types/depd/depd-tests.ts index 62a4470f15..f201cb504a 100644 --- a/types/depd/depd-tests.ts +++ b/types/depd/depd-tests.ts @@ -1,52 +1,41 @@ import depd = require('depd'); -var deprecate = depd("depd-tests"); +const deprecate = depd("depd-tests"); -function assert(condition: boolean, message: string): void { - if (!condition) { - throw new Error(message); - } -} +deprecate('message'); -function testDepdMessage(...args: string[]): boolean { - if (arguments.length < 1) { - deprecate('testDepdMessage argument.lenth<1'); - return true; - } else { - console.log('normal logic'); - return false; - } -} - -assert(testDepdMessage() === true, "Deprecated code must be triggered!"); -assert(testDepdMessage('a') === false, "Deprecated code must be triggered!"); - -interface ITestObject { - p1: string; - p2: string; -} - -var obj = { p1: 'deprecated property', p2: 'normal property' }; +const obj = { p1: 'deprecated property', p2: 'normal property' }; deprecate.property(obj, 'p1', 'property [p1] is deprecated!'); +deprecate.property(obj, 'p3', 'property [p3] is deprecated!'); // $ExpectError -console.log(obj.p1); - -interface ITestDeprecatedFunction { - func1?: Function; - func2?: Function; +interface TestDeprecatedFunction { + func1?(): void; + func2?(arg: string): boolean; } +const obj2 = {}; -var obj2 = {}; - -// message automatically derived from function name -obj2.func1 = deprecate.function(function func1() { +obj2.func1 = deprecate.function(() => { console.log('all calls to [func1] are deprecated '); }); -// specific message -obj2.func2 = deprecate.function(function () { +// $ExpectError +obj2.func2 = deprecate.function(() => { console.log('all calls to [func2] are deprecated '); }, 'func2'); +obj2.func2 = deprecate.function((arg: string) => { + console.log('all calls to [func2] are deprecated '); + return true; +}, 'func2'); + obj2.func1(); -obj2.func2(); \ No newline at end of file +obj2.func2(''); + +process.on('deprecation', error => { + const err: depd.DeprecationError = error; + error; // $ExpectType DeprecationError + + err.name; // $ExpectType "DeprecationError" + err.namespace; // $ExpectType string + err.stack; // $ExpectType string +}); diff --git a/types/depd/index.d.ts b/types/depd/index.d.ts index 0db1d877f6..fa1c3a71fe 100644 --- a/types/depd/index.d.ts +++ b/types/depd/index.d.ts @@ -1,16 +1,41 @@ -// Type definitions for depd 1.1.0 +// Type definitions for depd 1.1 // Project: https://github.com/dougwilson/nodejs-depd // Definitions by: Zhiyuan Wang +// BendingBender // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 - - -declare function depd(namespace: string): Deprecate; - -interface Deprecate { - (message: string): void; - function(fn: Function, message?: string): Function; - property(obj: Object, prop: string, message: string): void; -} +/// export = depd; + +declare function depd(namespace: string): depd.Deprecate; + +declare namespace depd { + interface Deprecate { + (message: string): void; + // tslint:disable-next-line ban-types + function(fn: T, message?: string): T; + property(obj: T, prop: keyof T, message: string): void; + } + + interface DeprecationError extends Error { + readonly name: 'DeprecationError'; + namespace: string; + stack: string; + } +} + +declare global { + namespace NodeJS { + interface Process { + addListener(event: 'deprecation', listener: (deprecationError: depd.DeprecationError) => void): this; + emit(event: 'deprecation', code: depd.DeprecationError): boolean; + on(event: 'deprecation', listener: (deprecationError: depd.DeprecationError) => void): this; + once(event: 'deprecation', listener: (deprecationError: depd.DeprecationError) => void): this; + prependListener(event: 'deprecation', listener: (deprecationError: depd.DeprecationError) => void): this; + prependOnceListener(event: 'deprecation', listener: (deprecationError: depd.DeprecationError) => void): this; + listeners(event: 'deprecation'): depd.DeprecationError[]; + } + } +} diff --git a/types/depd/tsconfig.json b/types/depd/tsconfig.json index 14bec0a373..23aa25d9e0 100644 --- a/types/depd/tsconfig.json +++ b/types/depd/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -20,4 +20,4 @@ "index.d.ts", "depd-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/depd/tslint.json b/types/depd/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/depd/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/diff/index.d.ts b/types/diff/index.d.ts index 49975756f4..720a8d3270 100644 --- a/types/diff/index.d.ts +++ b/types/diff/index.d.ts @@ -8,6 +8,15 @@ export = JsDiff; export as namespace JsDiff; declare namespace JsDiff { + interface ICaseOptions { + ignoreCase: boolean; + } + + interface ILinesOptions { + ignoreWhitespace?: boolean; + newlineIsToken?: boolean; + } + interface IDiffResult { value: string; count?: number; @@ -54,18 +63,15 @@ declare namespace JsDiff { tokenize(value: string): any; // return types are string or string[] } - function diffChars(oldStr: string, newStr: string): IDiffResult[]; + function diffChars(oldStr: string, newStr: string, options?: ICaseOptions): IDiffResult[]; - function diffWords(oldStr: string, newStr: string): IDiffResult[]; + function diffWords(oldStr: string, newStr: string, options?: ICaseOptions): IDiffResult[]; function diffWordsWithSpace(oldStr: string, newStr: string): IDiffResult[]; function diffJson(oldObj: object, newObj: object): IDiffResult[]; - function diffLines(oldStr: string, newStr: string, options?: { - ignoreWhitespace?: boolean, - newlineIsToken?: boolean, - }): IDiffResult[]; + function diffLines(oldStr: string, newStr: string, options?: ILinesOptions): IDiffResult[]; function diffCss(oldStr: string, newStr: string): IDiffResult[]; diff --git a/types/dockerode/index.d.ts b/types/dockerode/index.d.ts index aa6c03bf29..199fe1de75 100644 --- a/types/dockerode/index.d.ts +++ b/types/dockerode/index.d.ts @@ -488,6 +488,7 @@ declare namespace Dockerode { CpusetCpus: string; CpusetMems: string; Devices?: any; + DiskQuota: number; KernelMemory: number; Memory: number; MemoryReservation: number; diff --git a/types/documentdb/tslint.json b/types/documentdb/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/documentdb/tslint.json +++ b/types/documentdb/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/dompurify/index.d.ts b/types/dompurify/index.d.ts index 5406156bca..b72cc9e5e9 100644 --- a/types/dompurify/index.d.ts +++ b/types/dompurify/index.d.ts @@ -3,23 +3,18 @@ // Definitions by: Dave Taylor , Samira Bazuzi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -export = DOMPurify; export as namespace DOMPurify; -declare var DOMPurify: DOMPurify; +export declare function sanitize(source: string | Node): string; +export declare function sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT?: false; RETURN_DOM?: false; }): string; +export declare function sanitize(source: string | Node, config: Config & { RETURN_DOM_FRAGMENT: true; }): DocumentFragment; +export declare function sanitize(source: string | Node, config: Config & { RETURN_DOM: true; }): HTMLElement; +export declare function sanitize(source: string | Node, config: Config): string | HTMLElement | DocumentFragment; +export declare function addHook(hook: 'uponSanitizeElement', cb: (currentNode: Element, data: SanitizeElementHookEvent, config: Config) => void): void; +export declare function addHook(hook: 'uponSanitizeAttribute', cb: (currentNode: Element, data: SanitizeAttributeHookEvent, config: Config) => void): void; +export declare function addHook(hook: HookName, cb: (currentNode: Element, data: HookEvent, config: Config) => void): void; -interface DOMPurify { - sanitize(source: string | Node): string; - sanitize(source: string | Node, config: DOMPurifyConfig & { RETURN_DOM_FRAGMENT?: false; RETURN_DOM?: false; }): string; - sanitize(source: string | Node, config: DOMPurifyConfig & { RETURN_DOM_FRAGMENT: true; }): DocumentFragment; - sanitize(source: string | Node, config: DOMPurifyConfig & { RETURN_DOM: true; }): HTMLElement; - sanitize(source: string | Node, config: DOMPurifyConfig): string | HTMLElement | DocumentFragment; - addHook(hook: 'uponSanitizeElement', cb: (currentNode: Element, data: DOMPurifySanitizeElementHookEvent, config: DOMPurifyConfig) => void): void; - addHook(hook: 'uponSanitizeAttribute', cb: (currentNode: Element, data: DOMPurifySanitizeAttributeHookEvent, config: DOMPurifyConfig) => void): void; - addHook(hook: DOMPurifyHookName, cb: (currentNode: Element, data: DOMPurifyHookEvent, config: DOMPurifyConfig) => void): void; -} - -interface DOMPurifyConfig { +interface Config { ADD_ATTR?: string[]; ADD_TAGS?: string[]; ALLOW_DATA_ATTR?: boolean; @@ -27,6 +22,7 @@ interface DOMPurifyConfig { ALLOWED_TAGS?: string[]; FORBID_ATTR?: string[]; FORBID_TAGS?: string[]; + FORCE_BODY?: boolean; KEEP_CONTENT?: boolean; RETURN_DOM?: boolean; RETURN_DOM_FRAGMENT?: boolean; @@ -36,7 +32,7 @@ interface DOMPurifyConfig { WHOLE_DOCUMENT?: boolean; } -type DOMPurifyHookName +type HookName = 'beforeSanitizeElements' | 'uponSanitizeElement' | 'afterSanitizeElements' @@ -47,17 +43,17 @@ type DOMPurifyHookName | 'uponSanitizeShadowNode' | 'afterSanitizeShadowDOM'; -type DOMPurifyHookEvent - = DOMPurifySanitizeElementHookEvent - | DOMPurifySanitizeAttributeHookEvent +type HookEvent + = SanitizeElementHookEvent + | SanitizeAttributeHookEvent | null; -interface DOMPurifySanitizeElementHookEvent { +interface SanitizeElementHookEvent { tagName: string; allowedTags: string[]; } -interface DOMPurifySanitizeAttributeHookEvent { +interface SanitizeAttributeHookEvent { attrName: string; attrValue: string; keepAttr: boolean; diff --git a/types/ej.web.all/index.d.ts b/types/ej.web.all/index.d.ts index 4dfe069d73..ebbe57194d 100644 --- a/types/ej.web.all/index.d.ts +++ b/types/ej.web.all/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for ej.web.all 15.3 // Project: http://help.syncfusion.com/js/typescript -// Definitions by: Syncfusion +// Definitions by: Syncfusion // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -8,7 +8,7 @@ /*! * filename: ej.web.all.d.ts -* version : 15.3.0.26 +* version : 15.3.0.29 * Copyright Syncfusion Inc. 2001 - 2017. All rights reserved. * Use of this code is subject to the terms of our license. * A copy of the current license can be obtained at any time by e-mailing @@ -7791,7 +7791,7 @@ declare namespace ej { */ target?: string; - /** The title text to be displayed in the dialog header. In order to set title, you need to set showHeader as true since the title will be displayed in the dialog header. + /** The title text to be displayed in the dialog header. In order to set title, you need to set "showHeader" as true since the title will be displayed in the dialog header. */ title?: string; @@ -16048,7 +16048,7 @@ declare namespace ej { */ autoHeight?: boolean; - /** This API holds configuration setting for paste clenaup behavior. + /** This API holds configuration setting for paste cleanup behavior. * @Default {{ listConversion: false, cleanCSS: false, removeStyles: false, cleanElements: false }} */ pasteCleanupSettings?: PasteCleanupSettings; @@ -27283,7 +27283,7 @@ declare namespace ej { */ format?: string; - /** Sets the opacity of the dispalyed tooltip + /** Sets the opacity of the displayed tooltip * @Default {0.95} */ opacity?: number; @@ -27949,6 +27949,11 @@ declare namespace ej { */ refreshControl(): void; + /** This function Destroy the PivotGrid widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + /** This function returns the height of all rows and width each and every column. * @returns {any} */ @@ -27957,7 +27962,7 @@ declare namespace ej { /** This function creates the conditional formatting dialog to apply conditional formatting for PivotGrid control. * @returns {void} */ - createConditionalDialog(): void; + openConditionalFormattingDialog(): void; /** This function saves the current report to the database/local storage. * @returns {void} @@ -28163,11 +28168,16 @@ declare namespace ej { */ enableColumnResizing?: boolean; - /** Allows the user to fit the width of the columns based on its content. This is only applicable for enableColumnResizing option. + /** Allows the user to fit the width of the column based on its maximum text width. * @Default {false} */ resizeColumnsToFit?: boolean; + /** Allows the user to enable/disable the context menu of Pivot buttons in the PivotGrid. + * @Default {false} + */ + enableContextMenu?: boolean; + /** Allows the user to view large amount of data through virtual scrolling. * @Default {false} */ @@ -28616,14 +28626,6 @@ declare namespace ej { values?: any[]; } - export interface DataSourceColumnsGroupByDate { - - /** Contains the collection of formatString to group item from the field. - * @Default {[]} - */ - interval?: any[]; - } - export interface DataSourceColumn { /** Allows the user to bind the item by using its unique name as field name. @@ -28679,11 +28681,6 @@ declare namespace ej { * @Default {null} */ filterItems?: DataSourceColumnsFilterItems; - - /** Allows the user to group the field by date. This is applicable only when the format is set as "date". - * @Default {{}} - */ - groupByDate?: DataSourceColumnsGroupByDate; } export interface DataSourceRowsAdvancedFilter { @@ -28728,14 +28725,6 @@ declare namespace ej { values?: any[]; } - export interface DataSourceRowsGroupByDate { - - /** Contains the collection of formatString to group item from the field. - * @Default {[]} - */ - interval?: any[]; - } - export interface DataSourceRow { /** Allows the user to bind the item by using its unique name as field name. @@ -28791,11 +28780,6 @@ declare namespace ej { * @Default {null} */ filterItems?: DataSourceRowsFilterItems; - - /** Allows the user to group the field by date. This is applicable only when the format is set as "date". - * @Default {{}} - */ - groupByDate?: DataSourceRowsGroupByDate; } export interface DataSourceValuesMeasure { @@ -29128,6 +29112,16 @@ declare namespace ej { */ drillThroughDataTable?: string; + /** Allows the user to set the custom name for the service method responsible for performing value sorting operation in PivotGrid. + * @Default {ValueSorting} + */ + valueSorting?: string; + + /** Allows the user to set the custom name for the service method responsible for removing pivot button from GroupingBar/Field List. + * @Default {RemoveButton} + */ + removeButton?: string; + /** Allows the user to set the custom name for the service method responsible for write-back operation in OLAP Cube. This is only applicable in server-side component. * @Default {WriteBack} */ @@ -29215,6 +29209,11 @@ declare namespace ej { * @returns {void} */ refreshControl(): void; + + /** This function Destroy the PivotSchemaDesigner widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; } export namespace PivotSchemaDesigner { @@ -29269,7 +29268,7 @@ declare namespace ej { /** Allows the user to set custom name for the methods at service-end, communicated during AJAX post. * @Default {{}} */ - serviceMethod?: ServiceMethod; + serviceMethods?: any; /** Connects the service using the specified URL for any server updates. * @Default {“”} @@ -29372,39 +29371,6 @@ declare namespace ej { showNamedSets?: boolean; } - export interface ServiceMethod { - - /** Allows the user to set the custom name for the service method responsible for getting the values for the tree-view inside filter dialog. - * @Default {FetchMembers} - */ - fetchMembers?: string; - - /** Allows the user to set the custom name for the service method responsible for filtering operation in Field List. - * @Default {Filtering} - */ - filtering?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action, on expanding members in Field List. - * @Default {MemberExpanded} - */ - memberExpand?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action, on dropping a node into Field List. - * @Default {NodeDropped} - */ - nodeDropped?: string; - - /** Allows the user to set the custom name for the service method responsible for the server-side action on changing the checked state of a node in Field List. - * @Default {NodeStateModified} - */ - nodeStateModified?: string; - - /** Allows the user to set the custom name for the service method responsible for button removing operation in Field List. - * @Default {RemoveButton} - */ - removeButton?: string; - } - enum Layouts { ///To set the layout as same in the Excel. @@ -29552,6 +29518,11 @@ declare namespace ej { */ refreshControl(): void; + /** This function Destroy the PivotChart widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + /** Renders the control with the pivot engine obtained from olap cube. * @returns {void} */ @@ -29648,6 +29619,11 @@ declare namespace ej { */ rotation?: number; + /** Allows the user to enable/disable the context menu options in the PivotChart. + * @Default {false} + */ + enableContextMenu?: boolean; + /** Allows the user to set custom name for the methods at service-end, communicated on AJAX post. * @Default {{}} */ @@ -29675,6 +29651,10 @@ declare namespace ej { */ beforeServiceInvoke?(e: BeforeServiceInvokeEventArgs): void; + /** Triggers before Pivot Engine starts to populate. + */ + beforePivotEnginePopulate?(e: BeforePivotEnginePopulateEventArgs): void; + /** Triggers on performing drill up/down in PivotChart control. */ drillSuccess?(e: DrillSuccessEventArgs): void; @@ -29741,6 +29721,13 @@ declare namespace ej { element?: any; } + export interface BeforePivotEnginePopulateEventArgs { + + /** returns the current instance of PivotChart. + */ + chartObj?: any; + } + export interface DrillSuccessEventArgs { /** returns the current instance of PivotChart. @@ -30132,6 +30119,16 @@ declare namespace ej { */ refreshControl(): void; + /** Returns the control tab string that displays currently in PivotClient. + * @returns {void} + */ + getActiveTab(): void; + + /** This function Destroy the PivotClient widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + /** Returns the OlapReport string maintained along with the axis elements information. * @returns {string} */ @@ -30186,6 +30183,11 @@ declare namespace ej { */ dataSource?: DataSource; + /** Enables the Drill-Through feature which retrieves the raw items that are used to create the specific cell in PivotGrid. + * @Default {false} + */ + enableDrillThrough?: boolean; + /** Allows the user to customize the widget's layout and appearance. * @Default {{}} */ @@ -30196,7 +30198,7 @@ declare namespace ej { */ toolbarIconSettings?: ToolbarIconSettings; - /** Allows user to show unique name on pivotbutton. + /** Allows user to show unique name on pivot button. * @Default {false} */ showUniqueNameOnPivotButton?: boolean; @@ -30276,6 +30278,11 @@ declare namespace ej { */ isResponsive?: boolean; + /** Options to customize the size of the PivotClient control. + * @Default {Example:} + */ + size?: any; + /** Allows the user to set the localized language for the widget. * @Default {en-US} */ @@ -30335,6 +30342,10 @@ declare namespace ej { */ treeMapLoad?(e: TreeMapLoadEventArgs): void; + /** Triggers while clicking value cells in PivotGrid. + */ + drillThrough?(e: DrillThroughEventArgs): void; + /** Triggers while we initiate loading of the widget. */ load?(e: LoadEventArgs): void; @@ -30463,6 +30474,17 @@ declare namespace ej { element?: any; } + export interface DrillThroughEventArgs { + + /** return the JSON records of the generated cells on drill-through operation. + */ + data?: any; + + /** returns the HTML element of PivotClient. + */ + element?: any; + } + export interface LoadEventArgs { /** returns the HTML element of PivotClient component. @@ -31013,6 +31035,16 @@ declare namespace ej { */ loadReport?: string; + /** Allows the user to set the custom name for the service method responsible for remove a report collection from the database. + * @Default {RemoveReportFromDB} + */ + removeDBReport?: string; + + /** Allows the user to set the custom name for the service method responsible for rename the report collection in the database. + * @Default {RenameReportInDB} + */ + renameDBReport?: string; + /** Allows the user to set the custom name for the service method responsible for retrieving the MDX query for the current report. * @Default {GetMDXQuery} */ @@ -31067,6 +31099,16 @@ declare namespace ej { * @Default {CalculatedMember} */ calculatedMember?: string; + + /** Allows the user to set the custom name for the service method responsible for performing drill through operation. + * @Default {DrillThroughHierarchies} + */ + drillThroughHierarchies?: string; + + /** Allows the user to set the custom name for the service method responsible for performing drill through operation in data table. + * @Default {DrillThroughDataTable} + */ + drillThroughDataTable?: string; } enum ClientExportMode { @@ -31143,6 +31185,11 @@ declare namespace ej { */ renderControlFromJSON(): void; + /** This function Destroy the PivotGauge widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; + /** Returns the OlapReport string maintained along with the axis elements information. * @returns {string} */ @@ -31598,6 +31645,11 @@ declare namespace ej { */ doAjaxPost(): void; + /** Performs an asynchronous HTTP (FullPost) submit. + * @returns {void} + */ + doPostBack(): void; + /** Returns the OlapReport string maintained along with the axis elements information. * @returns {string} */ @@ -31632,6 +31684,11 @@ declare namespace ej { * @returns {void} */ renderControlSuccess(): void; + + /** This function Destroy the PivotTreemap widget all events bound using this._on will be unbind automatically and bring the control to pre-init state. + * @returns {void} + */ + destroy(): void; } export namespace PivotTreeMap { @@ -40686,6 +40743,8 @@ declare namespace ej { XLRibbon: Spreadsheet.XLRibbon; + XLScroll: Spreadsheet.XLScroll; + XLSearch: Spreadsheet.XLSearch; XLSelection: Spreadsheet.XLSelection; @@ -41339,6 +41398,15 @@ declare namespace ej { updateRibbonIcons(): void; } + export interface XLScroll { + + /** This method is used to scroll the sheet content to the specified cell address in the Spreadsheet. + * @param {string} Pass the cell address that you want to scroll to it. + * @returns {void} + */ + scrollToCell(range: string): void; + } + export interface XLSearch { /** This method is used to find and replace all data by workbook in the Spreadsheet. @@ -44481,7 +44549,7 @@ declare namespace ej { /** Returns the previous color of the signature. */ - perviousColor?: string; + previousColor?: string; /** Returns the current color of the signature. */ @@ -44841,6 +44909,12 @@ declare namespace ej { * @returns {any} */ addToDictionary(customWord: string): any; + + /** Retrieves the possible suggestion words for the error word passed as an argument. + * @param {string} Error word to get the suggestions + * @returns {any} + */ + getSuggestionWords(errorWord: string): any; } export namespace SpellCheck { @@ -44893,6 +44967,11 @@ declare namespace ej { */ controlsToValidate?: string; + /** When set to true, allows sending Asynchronous ajax request for checking the spelling errors. + * @Default {true} + */ + enableAsync?: boolean; + /** Triggers on the success of AJAX call request. */ actionSuccess?(e: ActionSuccessEventArgs): void; @@ -51357,7 +51436,7 @@ declare namespace ej.datavisualization { */ type?: string; - /** location - X and Y co-ordinate of the points with respect to chart area. axis - axis of the multilevellabels. multilevellabel - Multi level label details + /** location - X and Y co-ordinate of the points with respect to chart area. axis - axis of the multi level labels. multiLevelLabel - Multi level label details */ data?: any; } @@ -52537,7 +52616,7 @@ declare namespace ej.datavisualization { /** Specifies the type of the trendline for the series. * @Default {linear. See TrendlinesType} */ - type?: string; + type?: ej.datavisualization.Chart.TrendlinesType|string; /** Name for the trendlines that is to be displayed in the legend text. * @Default {trendline} @@ -52741,7 +52820,7 @@ declare namespace ej.datavisualization { */ dataSource?: any; - /** Specifies spline tension value for cardianal spline type. Value ranges from 0 to 1. + /** Specifies spline tension value for cardinal spline type. Value ranges from 0 to 1. * @Default {0.5} */ cardinalSplineTension?: number; @@ -57013,7 +57092,7 @@ declare namespace ej.datavisualization { */ dataSource?: any; - /** Specifies spline tension values for cardianal spline type.Value ranges from 0 to 1. + /** Specifies spline tension values for cardinal spline type.Value ranges from 0 to 1. * @Default {0.5} */ cardinalSplineTension?: number; @@ -57123,7 +57202,7 @@ declare namespace ej.datavisualization { splitMode?: ej.datavisualization.Chart.SplitMode|string; /** Quartile calculation has been performed in three different formulas to render the boxplot series . - * @Default {exclusive} + * @Default {exclusive.See BoxPlotMode} */ boxPlotMode?: ej.datavisualization.Chart.LabelPosition|string; @@ -57944,6 +58023,20 @@ declare namespace ej.datavisualization { Minus, } } + namespace Chart { + enum TrendlinesType { + //string + Linear, + //string + Exponential, + //string + Logarithmic, + //string + Power, + //string + Polynomial, + } + } namespace Chart { enum Mode { //string @@ -64669,22 +64762,22 @@ declare namespace ej.datavisualization { */ id?: string; - /** Sets the sourcenode of the connection data source item + /** Sets the source node of the connection data source item * @Default {null} */ sourceNode?: string; - /** Sets the targetnode of the connection data source item + /** Sets the target node of the connection data source item * @Default {null} */ targetNode?: string; - /** Sets the sourcepoint-x value of the connection data source item + /** Sets the sourcePointX value of the connection data source item * @Default {null} */ sourcePointX?: string; - /** Sets the sourcePoint-y value of the connection data source item + /** Sets the sourcePointY value of the connection data source item * @Default {null} */ sourcePointY?: string; @@ -64704,7 +64797,7 @@ declare namespace ej.datavisualization { */ crudAction?: DataSourceSettingsConnectionDataSourceCrudAction; - /** Specifies the customfields to get the updated data from client side to the server side + /** Specifies the custom fields to get the updated data from client side to the server side * @Default {[]} */ customFields?: any[]; @@ -64745,7 +64838,7 @@ declare namespace ej.datavisualization { */ crudAction?: DataSourceSettingsCrudAction; - /** Specifies the customfields to get the updated data from client side to the server side + /** Specifies the custom fields to get the updated data from client side to the server side * @Default {[]} */ customFields?: any[]; @@ -69214,7 +69307,7 @@ declare namespace ej.datavisualization { */ format?: string; - /** Sets the opacity of the dispalyed tooltip + /** Sets the opacity of the displayed tooltip * @Default {0.95} */ opacity?: number; @@ -69885,7 +69978,7 @@ interface JQueryPromise { */ cancel?: boolean; } -interface JQueryDeferred extends JQueryPromise { +interface JQueryDeferred { /** * Returns the cancel option value. */ diff --git a/types/ej.web.all/tslint.json b/types/ej.web.all/tslint.json index bb4f404bed..fe15198aba 100644 --- a/types/ej.web.all/tslint.json +++ b/types/ej.web.all/tslint.json @@ -6,6 +6,7 @@ "no-consecutive-blank-lines": false, "no-mergeable-namespace": false, "no-padding": false, + "no-any-union": false, "no-unnecessary-qualifier": false, "strict-export-declare-modifiers": false } diff --git a/types/ember-testing-helpers/tsconfig.json b/types/ember-testing-helpers/tsconfig.json index aaf474ecba..cd7634bd25 100644 --- a/types/ember-testing-helpers/tsconfig.json +++ b/types/ember-testing-helpers/tsconfig.json @@ -14,7 +14,8 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true }, "files": [ "index.d.ts", diff --git a/types/ember/tsconfig.json b/types/ember/tsconfig.json index d2f27dfec9..fbc4052a08 100644 --- a/types/ember/tsconfig.json +++ b/types/ember/tsconfig.json @@ -14,10 +14,11 @@ ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "allowSyntheticDefaultImports": true }, "files": [ "index.d.ts", "ember-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/engine.io-client/tsconfig.json b/types/engine.io-client/tsconfig.json index 257ae8bb42..e98b3db085 100644 --- a/types/engine.io-client/tsconfig.json +++ b/types/engine.io-client/tsconfig.json @@ -8,7 +8,6 @@ "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, - "strict": true, "baseUrl": "../", "typeRoots": [ "../" diff --git a/types/engine.io-client/tslint.json b/types/engine.io-client/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/engine.io-client/tslint.json +++ b/types/engine.io-client/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 878dc2c082..8ebb11ce94 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -56,7 +56,7 @@ export interface CommonWrapper

{ * Returns whether or not the current wrapper has a node anywhere in it's render tree that looks like the one passed in. * @param node */ - contains(node: ReactElement): boolean; + contains(node: ReactElement | string): boolean; /** * Returns whether or not a given react element exists in the shallow render tree. diff --git a/types/express-graphql/express-graphql-tests.ts b/types/express-graphql/express-graphql-tests.ts index 6b9c0b9169..d476682104 100644 --- a/types/express-graphql/express-graphql-tests.ts +++ b/types/express-graphql/express-graphql-tests.ts @@ -1,6 +1,6 @@ -import * as express from "express"; +import * as express from 'express'; import 'express-session'; -import * as graphqlHTTP from "express-graphql"; +import * as graphqlHTTP from 'express-graphql'; const app = express(); const schema = {}; @@ -8,19 +8,29 @@ const schema = {}; const graphqlOption: graphqlHTTP.OptionsObj = { graphiql: true, schema: schema, - formatError: (error:Error) => ({ - message: error.message, + formatError: (error: Error) => ({ + message: error.message }) }; const graphqlOptionRequest = (request: express.Request): graphqlHTTP.OptionsObj => ({ graphiql: true, schema: schema, - context: request.session, + context: request.session }); -app.use("/graphql1", graphqlHTTP(graphqlOption)); +const graphqlOptionRequestAsync = async (request: express.Request): Promise => { + return { + graphiql: true, + schema: await Promise.resolve(schema), + context: request.session + }; +}; -app.use("/graphql2", graphqlHTTP(graphqlOptionRequest)); +app.use('/graphql1', graphqlHTTP(graphqlOption)); -app.listen(8080); +app.use('/graphql2', graphqlHTTP(graphqlOptionRequest)); + +app.use('/graphqlasync', graphqlHTTP(graphqlOptionRequestAsync)); + +app.listen(8080, () => console.log('GraphQL Server running on localhost:8080')); diff --git a/types/express-graphql/index.d.ts b/types/express-graphql/index.d.ts index 680e83668b..077e3ab736 100644 --- a/types/express-graphql/index.d.ts +++ b/types/express-graphql/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for express-graphql // Project: https://www.npmjs.org/package/express-graphql -// Definitions by: Isman Usoh , Nitin Tutlani +// Definitions by: Isman Usoh +// Nitin Tutlani +// Daniel Fader // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { Request, Response } from "express"; @@ -12,7 +14,7 @@ declare namespace graphqlHTTP { * Used to configure the graphQLHTTP middleware by providing a schema * and other configuration options. */ - export type Options = ((req: Request) => OptionsObj) | OptionsObj + export type Options = ((req: Request) => OptionsObj) | ((req: Request) => Promise) | OptionsObj export type OptionsObj = { /** * A GraphQL schema from graphql-js. diff --git a/types/express-graphql/tsconfig.json b/types/express-graphql/tsconfig.json index 3394d7c54a..8cec14e03c 100644 --- a/types/express-graphql/tsconfig.json +++ b/types/express-graphql/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "module": "commonjs", + "target": "es2015", "lib": [ "es6" ], @@ -19,4 +20,4 @@ "index.d.ts", "express-graphql-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/express-serve-static-core/index.d.ts b/types/express-serve-static-core/index.d.ts index d03194b119..cb7de5faea 100644 --- a/types/express-serve-static-core/index.d.ts +++ b/types/express-serve-static-core/index.d.ts @@ -197,8 +197,10 @@ interface Request extends http.IncomingMessage, Express.Request { * * @param name */ + get(name: "set-cookie"): string[] | undefined; get(name: string): string | undefined; + header(name: "set-cookie"): string[] | undefined; header(name: string): string | undefined; /** diff --git a/types/express/express-tests.ts b/types/express/express-tests.ts index 2891a37d96..62e9fc7124 100644 --- a/types/express/express-tests.ts +++ b/types/express/express-tests.ts @@ -70,14 +70,26 @@ namespace express_tests { language = req.acceptsLanguages(['en', 'ja']); language = req.acceptsLanguages('en', 'ja'); - let existingHeader1 = req.get('existingHeader') as string; - let nonExistingHeader1 = req.get('nonExistingHeader') as undefined; + // downcasting + req.get('set-cookie') as undefined; + req.get('set-cookie') as string[]; + const setCookieHeader1 = req.get('set-cookie'); + if (setCookieHeader1 !== undefined) { + const setCookieHeader2: string[] = setCookieHeader1; + } + req.get('header') as undefined; + req.get('header') as string; + const header1 = req.get('header'); + if (header1 !== undefined) { + const header2: string = header1; + } - let existingHeader2 = req.header('existingHeader') as string; - let nonExistingHeader2 = req.header('nonExistingHeader') as undefined; + // upcasting + const setCookieHeader3: string[] | undefined = req.get('set-cookie'); + const header3: string | undefined = req.header('header'); - let existingHeader3 = req.headers.existingHeader as string; - let nonExistingHeader3 = req.headers.nonExistingHeader as any as undefined; + req.headers.existingHeader as string; + req.headers.nonExistingHeader as any as undefined; res.send(req.query['token']); }); diff --git a/types/fast-list/tslint.json b/types/fast-list/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/fast-list/tslint.json +++ b/types/fast-list/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/file-url/file-url-tests.ts b/types/file-url/file-url-tests.ts index e47cd737cb..463545b49f 100644 --- a/types/file-url/file-url-tests.ts +++ b/types/file-url/file-url-tests.ts @@ -1,10 +1,13 @@ import fileUrl = require("file-url"); -// Copied from https://github.com/sindresorhus/file-url/blob/14c7a69ae3798f50b3a4a21823c86e10b38160fe/readme.md - +// from https://raw.githubusercontent.com/sindresorhus/file-url/df60ecfe08f9844569c794e92ecc2c53d1dd298d/readme.md fileUrl('unicorn.jpg'); -//=> 'file:///Users/sindresorhus/dev/file-url/unicorn.jpg' +// => 'file:///Users/sindresorhus/dev/file-url/unicorn.jpg' fileUrl('/Users/pony/pics/unicorn.jpg'); -//=> 'file:///Users/pony/pics/unicorn.jpg' +// => 'file:///Users/pony/pics/unicorn.jpg' + +// passing {resolve: false} will make it not call path.resolve() on the path +fileUrl('unicorn.jpg', {resolve: false}); +// => 'file:///unicorn.jpg' diff --git a/types/file-url/index.d.ts b/types/file-url/index.d.ts index 1df68f6dbc..0772a16e38 100644 --- a/types/file-url/index.d.ts +++ b/types/file-url/index.d.ts @@ -1,12 +1,31 @@ -// Type definitions for file-url v1.0.1 +// Type definitions for file-url 2.0 // Project: https://github.com/sindresorhus/file-url -// Definitions by: MEDIA CHECK s.r.o. +// Definitions by: coderslagoon // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/* + Original typings for 1.0 were provided by + "MEDIA CHECK s.r.o. ", + Did not pass the tslint check, hence mentioning it here. +*/ + +/** + * Options for the fileUrl() API. + */ +interface FileUrlOptions { + /** + * Passing false will make it not call path.resolve() on the path. + */ + resolve?: boolean; +} + /** * Convert a path to a file URL. + * @param path File path to convert. + * @param options Options to use. + * @return File URL. */ -declare function fileUrl(path:string):string; +declare function fileUrl(path: string, options?: FileUrlOptions): string; /** * Convert a path to a file URL. diff --git a/types/file-url/tslint.json b/types/file-url/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/file-url/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/fluent-ffmpeg/index.d.ts b/types/fluent-ffmpeg/index.d.ts index e1380dc78e..87bdbfe15c 100644 --- a/types/fluent-ffmpeg/index.d.ts +++ b/types/fluent-ffmpeg/index.d.ts @@ -105,6 +105,11 @@ declare namespace Ffmpeg { size?: string; } + interface AudioVideoFilter { + filter: string; + options: string | string[] | {}; + } + class FfmpegCommand extends events.EventEmitter { constructor(options?: FfmpegCommandOptions); constructor(input?: string | stream.Readable, options?: FfmpegCommandOptions); @@ -144,10 +149,10 @@ declare namespace Ffmpeg { audioFrequency(freq: number): FfmpegCommand; withAudioQuality(quality: number): FfmpegCommand; audioQuality(quality: number): FfmpegCommand; - withAudioFilter(filters: { filter: string, options: any }): FfmpegCommand; - withAudioFilters(filters: { filter: string, options: any }): FfmpegCommand; - audioFilter(filters: { filter: string, options: any }): FfmpegCommand; - audioFilters(filters: { filter: string, options: any }): FfmpegCommand; + withAudioFilter(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; + withAudioFilters(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; + audioFilter(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; + audioFilters(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; // options/video; withNoVideo(): FfmpegCommand; @@ -156,10 +161,10 @@ declare namespace Ffmpeg { videoCodec(codec: string): FfmpegCommand; withVideoBitrate(bitrate: string | number): FfmpegCommand; videoBitrate(bitrate: string | number): FfmpegCommand; - withVideoFilter(filters: { filter: string, options: any }): FfmpegCommand; - withVideoFilters(filters: { filter: string, options: any }): FfmpegCommand; - videoFilter(filters: { filter: string, options: any }): FfmpegCommand; - videoFilters(filters: { filter: string, options: any }): FfmpegCommand; + withVideoFilter(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; + withVideoFilters(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; + videoFilter(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; + videoFilters(filters: string | string[] | AudioVideoFilter[]): FfmpegCommand; withOutputFps(fps: number): FfmpegCommand; withOutputFPS(fps: number): FfmpegCommand; withFpsOutput(fps: number): FfmpegCommand; diff --git a/types/flux-standard-action/index.d.ts b/types/flux-standard-action/index.d.ts index 388132bea6..ce328e9be8 100644 --- a/types/flux-standard-action/index.d.ts +++ b/types/flux-standard-action/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for flux-standard-action 0.5.0 // Project: https://github.com/acdlite/flux-standard-action // Definitions by: Qubo +// Simon Fridlund // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -16,12 +17,12 @@ export interface Action { /** Usage: `var action: Action & AnyMeta;` */ export interface AnyMeta { - meta: any + meta?: any; } /** Usage: `var action: Action & TypedMeta;` */ export interface TypedMeta { - meta: T + meta?: T; } export declare function isFSA(action: any): action is Action; diff --git a/types/fs-extra-promise/fs-extra-promise-tests.ts b/types/fs-extra-promise/fs-extra-promise-tests.ts index 75fa32f876..f273d6efb6 100644 --- a/types/fs-extra-promise/fs-extra-promise-tests.ts +++ b/types/fs-extra-promise/fs-extra-promise-tests.ts @@ -202,7 +202,7 @@ readStream = fs.createReadStream(path, { writeStream = fs.createWriteStream(path); writeStream = fs.createWriteStream(path, { flags: str, - defaultEncoding: str + encoding: str }); function isDirectoryCallback(err: Error, isDirectory: boolean) {} diff --git a/types/fs-extra/fs-extra-tests.ts b/types/fs-extra/fs-extra-tests.ts index 1af094260d..f405486adb 100644 --- a/types/fs-extra/fs-extra-tests.ts +++ b/types/fs-extra/fs-extra-tests.ts @@ -14,7 +14,7 @@ const fd = 0; const modeNum = 0; const modeStr = ""; const object = {}; -const errorCallback = (err: Error) => { }; +const errorCallback = (err: Error | null) => { }; const readOptions: fs.ReadOptions = { reviver: {} }; diff --git a/types/fs-extra/index.d.ts b/types/fs-extra/index.d.ts index df3324aca5..60c112c68b 100644 --- a/types/fs-extra/index.d.ts +++ b/types/fs-extra/index.d.ts @@ -14,140 +14,141 @@ import { Stats } from "fs"; export * from "fs"; export function copy(src: string, dest: string, options?: CopyOptions): Promise; -export function copy(src: string, dest: string, callback: (err: Error) => void): void; -export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void; +export function copy(src: string, dest: string, callback: (err: Error | null) => void): void; +export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error | null) => void): void; export function copySync(src: string, dest: string, options?: CopyOptions): void; export function move(src: string, dest: string, options?: MoveOptions): Promise; -export function move(src: string, dest: string, callback: (err: Error) => void): void; -export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error) => void): void; +export function move(src: string, dest: string, callback: (err: Error | null) => void): void; +export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error | null) => void): void; export function moveSync(src: string, dest: string, options?: MoveOptions): void; export function createFile(file: string): Promise; -export function createFile(file: string, callback: (err: Error) => void): void; +export function createFile(file: string, callback: (err: Error | null) => void): void; export function createFileSync(file: string): void; export function ensureDir(path: string): Promise; -export function ensureDir(path: string, callback: (err: Error) => void): void; +export function ensureDir(path: string, callback: (err: Error | null) => void): void; export function ensureDirSync(path: string): void; export function mkdirs(dir: string): Promise; -export function mkdirs(dir: string, callback: (err: Error) => void): void; +export function mkdirs(dir: string, callback: (err: Error | null) => void): void; export function mkdirp(dir: string): Promise; -export function mkdirp(dir: string, callback: (err: Error) => void): void; +export function mkdirp(dir: string, callback: (err: Error | null) => void): void; export function mkdirsSync(dir: string): void; export function mkdirpSync(dir: string): void; export function outputFile(file: string, data: any): Promise; -export function outputFile(file: string, data: any, callback: (err: Error) => void): void; +export function outputFile(file: string, data: any, callback: (err: Error | null) => void): void; export function outputFileSync(file: string, data: any): void; export function readJson(file: string, options?: ReadOptions): Promise; -export function readJson(file: string, callback: (err: Error, jsonObject: any) => void): void; -export function readJson(file: string, options: ReadOptions, callback: (err: Error, jsonObject: any) => void): void; +export function readJson(file: string, callback: (err: Error | null, jsonObject: any) => void): void; +export function readJson(file: string, options: ReadOptions, callback: (err: Error | null, jsonObject: any) => void): void; export function readJSON(file: string, options?: ReadOptions): Promise; -export function readJSON(file: string, callback: (err: Error, jsonObject: any) => void): void; -export function readJSON(file: string, options: ReadOptions, callback: (err: Error, jsonObject: any) => void): void; +export function readJSON(file: string, callback: (err: Error | null, jsonObject: any) => void): void; +export function readJSON(file: string, options: ReadOptions, callback: (err: Error | null, jsonObject: any) => void): void; export function readJsonSync(file: string, options?: ReadOptions): any; export function readJSONSync(file: string, options?: ReadOptions): any; export function remove(dir: string): Promise; -export function remove(dir: string, callback: (err: Error) => void): void; +export function remove(dir: string, callback: (err: Error | null) => void): void; export function removeSync(dir: string): void; export function outputJSON(file: string, data: any, options?: WriteOptions): Promise; -export function outputJSON(file: string, data: any, options: WriteOptions, callback: (err: Error) => void): void; -export function outputJSON(file: string, data: any, callback: (err: Error) => void): void; +export function outputJSON(file: string, data: any, options: WriteOptions, callback: (err: Error | null) => void): void; +export function outputJSON(file: string, data: any, callback: (err: Error | null) => void): void; export function outputJson(file: string, data: any, options?: WriteOptions): Promise; -export function outputJson(file: string, data: any, options: WriteOptions, callback: (err: Error) => void): void; -export function outputJson(file: string, data: any, callback: (err: Error) => void): void; +export function outputJson(file: string, data: any, options: WriteOptions, callback: (err: Error | null) => void): void; +export function outputJson(file: string, data: any, callback: (err: Error | null) => void): void; export function outputJsonSync(file: string, data: any, options?: WriteOptions): void; export function outputJSONSync(file: string, data: any, options?: WriteOptions): void; export function writeJSON(file: string, object: any, options?: WriteOptions): Promise; -export function writeJSON(file: string, object: any, callback: (err: Error) => void): void; -export function writeJSON(file: string, object: any, options: WriteOptions, callback: (err: Error) => void): void; +export function writeJSON(file: string, object: any, callback: (err: Error | null) => void): void; +export function writeJSON(file: string, object: any, options: WriteOptions, callback: (err: Error | null) => void): void; export function writeJson(file: string, object: any, options?: WriteOptions): Promise; -export function writeJson(file: string, object: any, callback: (err: Error) => void): void; -export function writeJson(file: string, object: any, options: WriteOptions, callback: (err: Error) => void): void; +export function writeJson(file: string, object: any, callback: (err: Error | null) => void): void; +export function writeJson(file: string, object: any, options: WriteOptions, callback: (err: Error | null) => void): void; export function writeJsonSync(file: string, object: any, options?: WriteOptions): void; export function writeJSONSync(file: string, object: any, options?: WriteOptions): void; export function ensureFile(path: string): Promise; -export function ensureFile(path: string, callback: (err: Error) => void): void; +export function ensureFile(path: string, callback: (err: Error | null) => void): void; export function ensureFileSync(path: string): void; export function ensureLink(src: string, dest: string): Promise; -export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void; +export function ensureLink(src: string, dest: string, callback: (err: Error | null) => void): void; export function ensureLinkSync(src: string, dest: string): void; export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise; -export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void; -export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void; +export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error | null) => void): void; +export function ensureSymlink(src: string, dest: string, callback: (err: Error | null) => void): void; export function ensureSymlinkSync(src: string, dest: string, type?: SymlinkType): void; export function emptyDir(path: string): Promise; -export function emptyDir(path: string, callback: (err: Error) => void): void; +export function emptyDir(path: string, callback: (err: Error | null) => void): void; export function emptyDirSync(path: string): void; export function pathExists(path: string): Promise; -export function pathExists(path: string, callback: (err: Error, exists: boolean) => void): void; +export function pathExists(path: string, callback: (err: Error | null, exists: boolean) => void): void; export function pathExistsSync(path: string): boolean; // fs async methods // copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v6/index.d.ts /** Tests a user's permissions for the file specified by path. */ -export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException) => void): void; -export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException) => void): void; +export function access(path: string | Buffer, callback: (err: NodeJS.ErrnoException | null) => void): void; +export function access(path: string | Buffer, mode: number, callback: (err: NodeJS.ErrnoException | null) => void): void; export function access(path: string | Buffer, mode?: number): Promise; -export function appendFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number | string; flag?: string; }, callback: (err: NodeJS.ErrnoException) => void): void; -export function appendFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; +export function appendFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number | string; flag?: string; }, + callback: (err: NodeJS.ErrnoException | null) => void): void; +export function appendFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; export function appendFile(file: string | Buffer | number, data: any, options?: { encoding?: string; mode?: number | string; flag?: string; }): Promise; -export function chmod(path: string | Buffer, mode: string | number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function chmod(path: string | Buffer, mode: string | number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function chmod(path: string | Buffer, mode: string | number): Promise; export function chown(path: string | Buffer, uid: number, gid: number): Promise; -export function chown(path: string | Buffer, uid: number, gid: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function chown(path: string | Buffer, uid: number, gid: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; -export function close(fd: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function close(fd: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function close(fd: number): Promise; -export function fchmod(fd: number, mode: string | number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function fchmod(fd: number, mode: string | number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function fchmod(fd: number, mode: string | number): Promise; -export function fchown(fd: number, uid: number, gid: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function fchown(fd: number, uid: number, gid: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function fchown(fd: number, uid: number, gid: number): Promise; export function fdatasync(fd: number, callback: () => void): void; export function fdatasync(fd: number): Promise; -export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; +export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => any): void; export function fstat(fd: number): Promise; -export function fsync(fd: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function fsync(fd: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function fsync(fd: number): Promise; -export function ftruncate(fd: number, callback: (err?: NodeJS.ErrnoException) => void): void; -export function ftruncate(fd: number, len: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function ftruncate(fd: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; +export function ftruncate(fd: number, len: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function ftruncate(fd: number, len?: number): Promise; -export function futimes(fd: number, atime: number, mtime: number, callback: (err?: NodeJS.ErrnoException) => void): void; -export function futimes(fd: number, atime: Date, mtime: Date, callback: (err?: NodeJS.ErrnoException) => void): void; +export function futimes(fd: number, atime: number, mtime: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; +export function futimes(fd: number, atime: Date, mtime: Date, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function futimes(fd: number, atime: number, mtime: number): Promise; export function futimes(fd: number, atime: Date, mtime: Date): Promise; -export function lchown(path: string | Buffer, uid: number, gid: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function lchown(path: string | Buffer, uid: number, gid: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function lchown(path: string | Buffer, uid: number, gid: number): Promise; -export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err?: NodeJS.ErrnoException) => void): void; +export function link(srcpath: string | Buffer, dstpath: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function link(srcpath: string | Buffer, dstpath: string | Buffer): Promise; -export function lstat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; +export function lstat(path: string | Buffer, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => any): void; export function lstat(path: string | Buffer): Promise; /** @@ -156,7 +157,7 @@ export function lstat(path: string | Buffer): Promise; * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ -export function mkdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException) => void): void; +export function mkdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; /** * Asynchronous mkdir - creates the directory specified in {path}. Parameter {mode} defaults to 0777. * @@ -164,35 +165,36 @@ export function mkdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoExcept * @param mode * @param callback No arguments other than a possible exception are given to the completion callback. */ -export function mkdir(path: string | Buffer, mode: number | string, callback: (err?: NodeJS.ErrnoException) => void): void; +export function mkdir(path: string | Buffer, mode: number | string, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function mkdir(path: string | Buffer): Promise; -export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; -export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void; +export function open(path: string | Buffer, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; +export function open(path: string | Buffer, flags: string | number, mode: number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void; export function open(path: string | Buffer, flags: string | number, mode?: number): Promise; -export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: Buffer) => void): void; +export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, + callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: Buffer) => void): void; export function read(fd: number, buffer: Buffer, offset: number, length: number, position: number | null): Promise; -export function readFile(file: string | Buffer | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; -export function readFile(file: string | Buffer | number, encoding: string, callback: (err: NodeJS.ErrnoException, data: string) => void): void; +export function readFile(file: string | Buffer | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void; +export function readFile(file: string | Buffer | number, encoding: string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void; export function readFile(file: string | Buffer | number, options: { flag?: string; } | { encoding: string; flag?: string; }, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void; export function readFile(file: string | Buffer | number, options: { flag?: string; } | { encoding: string; flag?: string; }): Promise; // tslint:disable-next-line:unified-signatures export function readFile(file: string | Buffer | number, encoding: string): Promise; export function readFile(file: string | Buffer | number): Promise; -export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void; +export function readdir(path: string | Buffer, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void; export function readdir(path: string | Buffer): Promise; -export function readlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void; +export function readlink(path: string | Buffer, callback: (err: NodeJS.ErrnoException | null, linkString: string) => any): void; export function readlink(path: string | Buffer): Promise; -export function realpath(path: string | Buffer, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; -export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void; +export function realpath(path: string | Buffer, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => any): void; +export function realpath(path: string | Buffer, cache: { [path: string]: string }, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => any): void; export function realpath(path: string | Buffer, cache?: { [path: string]: string }): Promise; -export function rename(oldPath: string, newPath: string, callback: (err?: NodeJS.ErrnoException) => void): void; +export function rename(oldPath: string, newPath: string, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function rename(oldPath: string, newPath: string): Promise; /** @@ -201,17 +203,17 @@ export function rename(oldPath: string, newPath: string): Promise; * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ -export function rmdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException) => void): void; +export function rmdir(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function rmdir(path: string | Buffer): Promise; -export function stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void; +export function stat(path: string | Buffer, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => any): void; export function stat(path: string | Buffer): Promise; -export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: string, callback: (err?: NodeJS.ErrnoException) => void): void; +export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type: string, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function symlink(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): Promise; -export function truncate(path: string | Buffer, callback: (err?: NodeJS.ErrnoException) => void): void; -export function truncate(path: string | Buffer, len: number, callback: (err?: NodeJS.ErrnoException) => void): void; +export function truncate(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; +export function truncate(path: string | Buffer, len: number, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function truncate(path: string | Buffer, len?: number): Promise; /** @@ -220,25 +222,25 @@ export function truncate(path: string | Buffer, len?: number): Promise; * @param path * @param callback No arguments other than a possible exception are given to the completion callback. */ -export function unlink(path: string | Buffer, callback: (err?: NodeJS.ErrnoException) => void): void; +export function unlink(path: string | Buffer, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function unlink(path: string | Buffer): Promise; export function utimes(path: string | Buffer, atime: number, mtime: number, callback: (err?: NodeJS.ErrnoException) => void): void; -export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback: (err?: NodeJS.ErrnoException) => void): void; +export function utimes(path: string | Buffer, atime: Date, mtime: Date, callback: (err?: NodeJS.ErrnoException | null) => void): void; export function utimes(path: string | Buffer, atime: number, mtime: number): Promise; export function utimes(path: string | Buffer, atime: Date, mtime: Date): Promise; export function write(fd: number, buffer: Buffer, offset: number, length: number, position: number | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; -export function write(fd: number, buffer: Buffer, offset: number, length: number, callback: (err: NodeJS.ErrnoException, written: number, buffer: Buffer) => void): void; -export function write(fd: number, data: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; -export function write(fd: number, data: any, offset: number, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; -export function write(fd: number, data: any, offset: number, encoding: string, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void; +export function write(fd: number, buffer: Buffer, offset: number, length: number, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: Buffer) => void): void; +export function write(fd: number, data: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; +export function write(fd: number, data: any, offset: number, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; +export function write(fd: number, data: any, offset: number, encoding: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void; export function write(fd: number, buffer: Buffer, offset: number, length: number, position?: number | null): Promise; export function write(fd: number, data: any, offset: number, encoding?: string): Promise; -export function writeFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void; +export function writeFile(file: string | Buffer | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void; export function writeFile(file: string | Buffer | number, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): Promise; -export function writeFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback: (err: NodeJS.ErrnoException) => void): void; +export function writeFile(file: string | Buffer | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback: (err: NodeJS.ErrnoException | null) => void): void; /** * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory. @@ -247,7 +249,7 @@ export function writeFile(file: string | Buffer | number, data: any, options: { * @param callback The created folder path is passed as a string to the callback's second parameter. */ export function mkdtemp(prefix: string): Promise; -export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void; +export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void; export interface PathEntry { path: string; diff --git a/types/gapi.auth2/index.d.ts b/types/gapi.auth2/index.d.ts index a8e84d478b..4cdef77a80 100644 --- a/types/gapi.auth2/index.d.ts +++ b/types/gapi.auth2/index.d.ts @@ -42,11 +42,7 @@ declare namespace gapi.auth2 { /** * Get permission from the user to access the specified scopes offline. */ - grantOfflineAccess(options?: { - scope?: string; - prompt?: "select_account" | "consent"; - app_package_name?: string; - }): any; + grantOfflineAccess(options?: OfflineAccessOptions): Promise<{code: string}>; /** * Attaches the sign-in flow to the specified container's click handler. @@ -107,6 +103,17 @@ declare namespace gapi.auth2 { scope?: string; } + /** + * Definitions by: John + * Interface that represents the different configuration parameters for the GoogleAuth.grantOfflineAccess(options) method. + * Reference: https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauth2offlineaccessoptions + */ + interface OfflineAccessOptions { + scope?: string; + prompt?: "select_account" | "consent"; + app_package_name?: string; + } + /** * Interface that represents the different configuration parameters for the gapi.auth2.init method. * Reference: https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauth2clientconfig diff --git a/types/get-stream/tslint.json b/types/get-stream/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/get-stream/tslint.json +++ b/types/get-stream/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/gl-matrix/gl-matrix-tests.ts b/types/gl-matrix/gl-matrix-tests.ts index 3642cca521..505bbcbb26 100644 --- a/types/gl-matrix/gl-matrix-tests.ts +++ b/types/gl-matrix/gl-matrix-tests.ts @@ -1,5 +1,5 @@ // common -import { vec2, mat2, mat3, mat4, vec3, vec4, mat2d, quat } from "gl-matrix"; +import { glMatrix, vec2, mat2, mat3, mat4, vec3, vec4, mat2d, quat } from "gl-matrix"; var outVal: number; var outBool: boolean; @@ -294,8 +294,9 @@ outMat4 = mat4.fromXRotation(outMat4, Math.PI); outMat4 = mat4.fromYRotation(outMat4, Math.PI); outMat4 = mat4.fromZRotation(outMat4, Math.PI); outMat4 = mat4.fromRotationTranslation(outMat4, quatA, vec3A); -outVec3 = mat4.getTranslation(outVec3, mat4A) -outQuat = mat4.getRotation(outQuat, mat4A) +outVec3 = mat4.getTranslation(outVec3, mat4A); +outVec3 = mat4.getScaling(outVec3, mat4A); +outQuat = mat4.getRotation(outQuat, mat4A); outMat4 = mat4.fromRotationTranslationScale(outMat4, quatA, vec3A, vec3B); outMat4 = mat4.fromRotationTranslationScaleOrigin(outMat4, quatA, vec3A, vec3B, vec3A); outMat4 = mat4.fromQuat(outMat4, quatB); @@ -349,7 +350,18 @@ outQuat = quat.calculateW(outQuat, quatA); outBool = quat.exactEquals(quatA, quatB); outBool = quat.equals(quatA, quatB); +// glMatrix +outVal = glMatrix.RANDOM(); +outVal = glMatrix.EPSILON; +outBool = glMatrix.ENABLE_SIMD; +outBool = glMatrix.SIMD_AVAILABLE; +outBool = glMatrix.USE_SIMD; +outBool = glMatrix.equals(1, 1); +outBool = glMatrix.equals(1, -1); +outVal = glMatrix.toRadian(10); + // common +import _glMatrix = require('gl-matrix/src/gl-matrix/common'); import _vec2 = require('gl-matrix/src/gl-matrix/vec2'); import _vec3 = require('gl-matrix/src/gl-matrix/vec3'); import _vec4 = require('gl-matrix/src/gl-matrix/vec4'); @@ -643,8 +655,9 @@ outMat4 = _mat4.fromXRotation(outMat4, Math.PI); outMat4 = _mat4.fromYRotation(outMat4, Math.PI); outMat4 = _mat4.fromZRotation(outMat4, Math.PI); outMat4 = _mat4.fromRotationTranslation(outMat4, quatA, vec3A); -outVec3 = _mat4.getTranslation(outVec3, mat4A) -outQuat = _mat4.getRotation(outQuat, mat4A) +outVec3 = _mat4.getTranslation(outVec3, mat4A); +outVec3 = _mat4.getScaling(outVec3, mat4A); +outQuat = _mat4.getRotation(outQuat, mat4A); outMat4 = _mat4.fromRotationTranslationScale(outMat4, quatA, vec3A, vec3B); outMat4 = _mat4.fromRotationTranslationScaleOrigin(outMat4, quatA, vec3A, vec3B, vec3A); outMat4 = _mat4.fromQuat(outMat4, quatB); @@ -697,3 +710,13 @@ outQuat = _quat.fromMat3(outQuat, mat3A); outQuat = _quat.calculateW(outQuat, quatA); outBool = _quat.exactEquals(quatA, quatB); outBool = _quat.equals(quatA, quatB); + +// glMatrix common +outVal = _glMatrix.RANDOM(); +outVal = _glMatrix.EPSILON; +outBool = _glMatrix.ENABLE_SIMD; +outBool = _glMatrix.SIMD_AVAILABLE; +outBool = _glMatrix.USE_SIMD; +outBool = _glMatrix.equals(1, 1); +outBool = _glMatrix.equals(1, -1); +outVal = _glMatrix.toRadian(10); diff --git a/types/gl-matrix/index.d.ts b/types/gl-matrix/index.d.ts index 89f28934b8..d39496e20d 100644 --- a/types/gl-matrix/index.d.ts +++ b/types/gl-matrix/index.d.ts @@ -1,9 +1,49 @@ -// Type definitions for gl-matrix 2.2.2 +// Type definitions for gl-matrix 2.3.2 // Project: https://github.com/toji/gl-matrix // Definitions by: Mattijs Kneppers , based on definitions by Tat +// Nikolay Babanov +// Austin Martin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'gl-matrix' { + // Global Utilities + export class glMatrix { + // Configuration constants + public static EPSILON: number; + public static ARRAY_TYPE: any; + public static RANDOM(): number; + public static ENABLE_SIMD: boolean; + + // Compatibility detection + public static SIMD_AVAILABLE: boolean; + public static USE_SIMD: boolean; + + /** + * Sets the type of array used when creating new vectors and matrices + * + * @param {any} type - Array type, such as Float32Array or Array + */ + public static setMatrixArrayType(type: any): void; + + /** + * Convert Degree To Radian + * + * @param {number} a - Angle in Degrees + */ + public static toRadian(a: number): number; + + /** + * Tests whether or not the arguments have approximately the same value, within an absolute + * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less + * than or equal to 1.0, and a relative tolerance is used for larger values) + * + * @param {number} a - The first number to test. + * @param {number} b - The second number to test. + * @returns {boolean} True if the numbers are approximately equal, false otherwise. + */ + public static equals(a: number, b: number): boolean; + } + // vec2 export class vec2 extends Float32Array { private typeVec2: number; @@ -2450,6 +2490,17 @@ declare module 'gl-matrix' { */ public static getTranslation(out: vec3, mat: mat4): vec3; + /** + * Returns the scaling factor component of a transformation matrix. + * If a matrix is built with fromRotationTranslationScale with a + * normalized Quaternion parameter, the returned vector will be + * the same as the scaling vector originally supplied. + * @param {vec3} out Vector to receive scaling factor component + * @param {mat4} mat Matrix to be decomposed (input) + * @return {vec3} out + */ + public static getScaling(out: vec3, mat: mat4): vec3; + /** * Returns a quaternion representing the rotational component * of a transformation matrix. If a matrix is built with @@ -3045,6 +3096,11 @@ declare module 'gl-matrix' { } } +declare module 'gl-matrix/src/gl-matrix/common' { + import { glMatrix } from 'gl-matrix'; + export = glMatrix; +} + declare module 'gl-matrix/src/gl-matrix/vec2' { import { vec2 } from 'gl-matrix'; export = vec2; diff --git a/types/google-libphonenumber/index.d.ts b/types/google-libphonenumber/index.d.ts index 1fc2d321aa..9d87ca825c 100644 --- a/types/google-libphonenumber/index.d.ts +++ b/types/google-libphonenumber/index.d.ts @@ -100,6 +100,14 @@ declare namespace libphonenumber { TOO_SHORT, TOO_LONG } + + export enum MatchType { + EXACT_MATCH, + NO_MATCH, + NOT_A_NUMBER, + NSN_MATCH, + SHORT_NSN_MATCH + } } export class PhoneNumberUtil { @@ -109,6 +117,7 @@ declare namespace libphonenumber { getNumberType(phoneNumber: PhoneNumber): PhoneNumberType; getRegionCodeForCountryCode(countryCallingCode: number): string; getRegionCodeForNumber(phoneNumber: PhoneNumber): string | undefined; + getSupportedRegions():string []; isAlphaNumber(number: string): boolean; isLeadingZeroPossible(countryCallingCode: number): boolean; isNANPACountry(regionCode?: string): boolean; @@ -124,6 +133,7 @@ declare namespace libphonenumber { parse(number?: string, region?: string): PhoneNumber; parseAndKeepRawInput(number: string, regionCode?: string): PhoneNumber; truncateTooLongNumber(number: PhoneNumber): boolean; + isNumberMatch(firstNumber: string | PhoneNumber, secondNumber: string | PhoneNumber): PhoneNumberUtil.MatchType; } export class AsYouTypeFormatter { diff --git a/types/google.visualization/google.visualization-tests.ts b/types/google.visualization/google.visualization-tests.ts index 10c590ca9c..d47c10efba 100644 --- a/types/google.visualization/google.visualization-tests.ts +++ b/types/google.visualization/google.visualization-tests.ts @@ -96,7 +96,7 @@ function test_barChart() { role: "annotation" }, 2]); - var options = { + var options: google.visualization.BarChartOptions = { title: "Density of Precious Metals, in g/cm^3", width: 600, height: 400, @@ -139,7 +139,7 @@ function test_histogram() { ['Ultrasaurus (ultra lizard)', 30.5], ['Velociraptor (swift robber)', 1.8]]); - var options = { + var options: google.visualization.HistogramOptions = { title: 'Lengths of dinosaurs, in meters', legend: { position: 'none' } }; diff --git a/types/google.visualization/index.d.ts b/types/google.visualization/index.d.ts index 274d8bb8b1..e5295fce9e 100644 --- a/types/google.visualization/index.d.ts +++ b/types/google.visualization/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Google Visualisation Apis // Project: https://developers.google.com/chart/ -// Definitions by: Dan Ludwig , Gregory Moore , Dan Manastireanu , Michael Cheng , Ivan Bisultanov +// Definitions by: Dan Ludwig , Gregory Moore , Dan Manastireanu , Michael Cheng , Ivan Bisultanov , Gleb Mazovetskiy // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace google { @@ -15,7 +15,7 @@ declare namespace google { function setOnLoadCallback(handler: Function): void; } - //https://developers.google.com/chart/interactive/docs/reference + // https://developers.google.com/chart/interactive/docs/reference namespace visualization { export interface ChartSpecs { @@ -291,7 +291,7 @@ declare namespace google { //#endregion //#region GeoChart - //https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart + // https://developers.google.com/chart/interactive/docs/gallery/geochart export class GeoChart extends ChartBase { draw(data: DataTable, options: GeoChartOptions): void; } @@ -306,7 +306,7 @@ declare namespace google { enableRegionInteractivity?: boolean; height?: number; keepAspectRatio?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; region?: string; magnifyingGlass?: GeoChartMagnifyingGlass; markerOpacity?: number; @@ -410,23 +410,26 @@ declare namespace google { } export interface ChartArea { - top?: any; - left?: any; - right?: any; - bottom?: any; - width?: any; - height?: any; + backgroundColor: string | { stroke: string; strokeWidth?: number }; + top?: number | string; + left?: number | string; + right?: number | string; + bottom?: number | string; + width?: number | string; + height?: number | string; } + export type ChartLegendPosition = 'bottom' | 'left' | 'in' | 'none' | 'right' | 'top'; + export type ChartLegendAlignment = 'start' | 'center' | 'end'; export interface ChartLegend { - alignment?: string; + alignment?: ChartLegendAlignment; maxLines?: number; - position?: string; + position?: ChartLegendPosition; textStyle?: ChartTextStyle; numberFormat?: string; } - // https://google-developers.appspot.com/chart/interactive/docs/animation + // https://developers.google.com/chart/interactive/docs/animation export interface TransitionAnimation { duration?: number; easing?: string; // linear, in, out, inAndOut @@ -434,7 +437,7 @@ declare namespace google { } export interface ChartAxis { - baseline?: number; // This option is only supported for a continuous axis. https://google-developers.appspot.com/chart/interactive/docs/customizing_axes#Terminology + baseline?: number; // This option is only supported for a continuous axis. https://developers.google.com/chart/interactive/docs/customizing_axes#Terminology baselineColor?: string; // google's documentation on this is wrong, specifies it as a number. The color of the baseline for the horizontal axis. Can be any HTML color string, for example: 'red' or '#00cc00' direction?: number; // The direction in which the values along the horizontal axis grow. Specify -1 to reverse the order of the values. format?: string; // icu pattern set http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details @@ -536,7 +539,7 @@ declare namespace google { //#endregion //#region ScatterChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/scatterchart + // https://developers.google.com/chart/interactive/docs/gallery/scatterchart export class ScatterChart extends CoreChartBase { draw(data: DataTable | DataView, options?: ScatterChartOptions): void; } @@ -559,7 +562,7 @@ declare namespace google { forceIFrame?: boolean; hAxis?: ChartAxis; height?: number; - legend?: ChartLegend | "none"; + legend?: ChartLegend | 'none'; lineWidth?: number; pointSize?: number; selectionMode?: string; @@ -576,13 +579,12 @@ declare namespace google { //#endregion //#region ColumnChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/columnchart + // https://developers.google.com/chart/interactive/docs/gallery/columnchart export class ColumnChart extends CoreChartBase { - draw(data: DataTable, options: ColumnChartOptions): void; - draw(data: DataView, options: ColumnChartOptions): void; + draw(data: DataTable | DataView, options: ColumnChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/columnchart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/columnchart#Configuration_Options export interface ColumnChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -599,7 +601,7 @@ declare namespace google { hAxis?: ChartAxis; height?: number; isStacked?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; reverseCategories?: boolean; selectionMode?: string // single / multiple series?: any; @@ -616,13 +618,12 @@ declare namespace google { //#endregion //#region LineChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart + // https://developers.google.com/chart/interactive/docs/gallery/linechart export class LineChart extends CoreChartBase { - draw(data: DataTable, options: LineChartOptions): void; - draw(data: DataView, options: LineChartOptions): void; + draw(data: DataTable | DataView, options: LineChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/linechart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/linechart#Configuration_Options export interface LineChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -642,7 +643,7 @@ declare namespace google { hAxis?: ChartAxis; height?: number; interpolateNulls?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; lineWidth?: number; orientation?: string; pointSize?: number; @@ -662,7 +663,7 @@ declare namespace google { //#endregion //#region BarChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/barchart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/barchart#Configuration_Options export interface BarChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -681,7 +682,7 @@ declare namespace google { hAxis?: ChartAxis; height?: number; isStacked?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; reverseCategories?: boolean; series?: any; theme?: string; @@ -694,22 +695,20 @@ declare namespace google { width?: number; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/barchart + // https://developers.google.com/chart/interactive/docs/gallery/barchart export class BarChart extends CoreChartBase { - draw(data: DataTable, options: BarChartOptions): void; - draw(data: DataView, options: BarChartOptions): void; + draw(data: DataTable | DataView, options: BarChartOptions): void; } //#endregion //#region Histogram - // https://google-developers.appspot.com/chart/interactive/docs/gallery/histogram + // https://developers.google.com/chart/interactive/docs/gallery/histogram export class Histogram extends CoreChartBase { - draw(data: DataTable, options: HistogramOptions): void; - draw(data: DataView, options: HistogramOptions): void; + draw(data: DataTable | DataView, options: HistogramOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/histogram#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/histogram#Configuration_Options export interface HistogramOptions { animation?: TransitionAnimation; axisTitlesPosition?: string; // in, out, none @@ -727,7 +726,7 @@ declare namespace google { height?: number; interpolateNulls?: boolean; isStacked?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; orientation?: string; reverseCategories?: boolean; series?: any; @@ -750,13 +749,12 @@ declare namespace google { //#endregion //#region AreaChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/areachart + // https://developers.google.com/chart/interactive/docs/gallery/areachart export class AreaChart extends CoreChartBase { - draw(data: DataTable, options: AreaChartOptions): void; - draw(data: DataView, options: AreaChartOptions): void; + draw(data: DataTable | DataView, options: AreaChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/areachart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/areachart#Configuration_Options export interface AreaChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -777,7 +775,7 @@ declare namespace google { height?: number; interpolateNulls?: boolean; isStacked?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; lineWidth?: number; orientation?: string; pointSize?: number; @@ -800,8 +798,7 @@ declare namespace google { // https://developers.google.com/chart/interactive/docs/gallery/annotationchart export class AnnotationChart extends CoreChartBase { - draw(data: DataTable, options: AnnotationChartOptions): void; - draw(data: DataView, options: AnnotationChartOptions): void; + draw(data: DataTable | DataView, options: AnnotationChartOptions): void; setVisibleChartRange(start: Date, end: Date): void; getVisibleChartRange(): {start: Date; end: Date }; hideDataColumns(columnIndexes: number | number[]): void; @@ -825,7 +822,7 @@ declare namespace google { displayRangeSelector?: boolean; displayZoomButtons?: boolean; fill?: number; - legendPosition?: string; + legendPosition?: 'sameRow' | 'newRow'; max?: number; min?: number; numberFormats?: any; @@ -840,13 +837,12 @@ declare namespace google { //#endregion //#region SteppedAreaChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/areachart + // https://developers.google.com/chart/interactive/docs/gallery/areachart export class SteppedAreaChart extends CoreChartBase { - draw(data: DataTable, options: SteppedAreaChartOptions): void; - draw(data: DataView, options: SteppedAreaChartOptions): void; + draw(data: DataTable | DataView, options: SteppedAreaChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/areachart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/areachart#Configuration_Options export interface SteppedAreaChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -864,7 +860,7 @@ declare namespace google { height?: number; interpolateNulls?: boolean; isStacked?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; reverseCategories?: boolean; selectionMode?: string // single / multiple series?: any; @@ -881,13 +877,12 @@ declare namespace google { //#endregion //#region PieChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart + // https://developers.google.com/chart/interactive/docs/gallery/piechart export class PieChart extends CoreChartBase { - draw(data: DataTable, options: PieChartOptions): void; - draw(data: DataView, options: PieChartOptions): void; + draw(data: DataTable | DataView, options: PieChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/piechart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/piechart#Configuration_Options export interface PieChartOptions { backgroundColor?: any; chartArea?: ChartArea; @@ -897,7 +892,7 @@ declare namespace google { fontName?: string; height?: number; is3D?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; pieHole?: number; pieSliceBorderColor?: string; pieSliceText?: string; @@ -917,10 +912,9 @@ declare namespace google { //#endregion //#region BubbleChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/scatterchart + // https://developers.google.com/chart/interactive/docs/gallery/scatterchart export class BubbleChart extends CoreChartBase { - draw(data: DataTable, options?: BubbleChartOptions): void; - draw(data: DataView, options?: BubbleChartOptions): void; + draw(data: DataTable | DataView, options?: BubbleChartOptions): void; } export interface BubbleChartOptions { @@ -938,7 +932,7 @@ declare namespace google { forceIFrame?: boolean; hAxis?: ChartAxis; height?: number; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; selectionMode?: string; series?: any; sizeAxis?: ChartSizeAxis; @@ -968,15 +962,14 @@ declare namespace google { //#endregion //#region TreeMap - // https://google-developers.appspot.com/chart/interactive/docs/gallery/treemap + // https://developers.google.com/chart/interactive/docs/gallery/treemap export class TreeMap extends ChartBase { - draw(data: DataTable, options?: TreeMapOptions): void; - draw(data: DataView, options?: TreeMapOptions): void; + draw(data: DataTable | DataView, options?: TreeMapOptions): void; goUpAndDraw(): void; getMaxPossibleDepth(): number; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/treemap#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/treemap#Configuration_Options export interface TreeMapOptions { fontColor?: string; fontFamily?: string; @@ -1007,13 +1000,12 @@ declare namespace google { //#endregion //#region Table - // https://google-developers.appspot.com/chart/interactive/docs/gallery/table + // https://developers.google.com/chart/interactive/docs/gallery/table export class Table extends ChartBase { - draw(data: DataTable, options?: TableOptions): void; - draw(data: DataView, options?: TableOptions): void; + draw(data: DataTable | DataView, options?: TableOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/table#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/table#Configuration_Options export interface TableOptions { allowHtml?: boolean; alternatingRowStyle?: boolean; @@ -1046,15 +1038,14 @@ declare namespace google { //#endregion //#region Timeline - // https://google-developers.appspot.com/chart/interactive/docs/gallery/timeline + // https://developers.google.com/chart/interactive/docs/gallery/timeline export class Timeline { constructor(element: Element); - draw(data: DataTable, options?: TimelineOptions): void; - draw(data: DataView, options?: TimelineOptions): void; + draw(data: DataTable | DataView, options?: TimelineOptions): void; clearChart(): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/timeline#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/timeline#Configuration_Options export interface TimelineOptions { avoidOverlappingGridLines?: boolean; backgroundColor?: any; @@ -1082,12 +1073,12 @@ declare namespace google { //#endregion //#region CandlestickChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/candlestickchart + // https://developers.google.com/chart/interactive/docs/gallery/candlestickchart export class CandlestickChart extends CoreChartBase { draw(data: DataTable | DataView, options: CandlestickChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/candlestickchart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/candlestickchart#Configuration_Options export interface CandlestickChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -1103,7 +1094,7 @@ declare namespace google { fontName?: string; hAxis?: ChartAxis; height?: number; - legend?: ChartLegend | "none"; + legend?: ChartLegend | 'none'; orientation?: string; reverseCategories?: boolean; selectionMode?: string // single / multiple @@ -1121,13 +1112,12 @@ declare namespace google { //#endregion //#region ComboChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/combochart + // https://developers.google.com/chart/interactive/docs/gallery/combochart export class ComboChart extends CoreChartBase { - draw(data: DataTable, options: ComboChartOptions): void; - draw(data: DataView, options: ComboChartOptions): void; + draw(data: DataTable | DataView, options: ComboChartOptions): void; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/combochart#configuration-options + // https://developers.google.com/chart/interactive/docs/gallery/combochart#configuration-options export interface ComboChartOptions { aggregationTarget?: string; animation?: TransitionAnimation; @@ -1151,7 +1141,7 @@ declare namespace google { height?: number; interpolateNulls?: boolean; isStacked?: boolean; - legend?: ChartLegend; + legend?: ChartLegend | 'none'; lineDashStyle?: number[]; lineWidth?: number; orientation?: string; @@ -1383,16 +1373,15 @@ declare namespace google { //#endregion //#region OrgChart - // https://google-developers.appspot.com/chart/interactive/docs/gallery/orgchart + // https://developers.google.com/chart/interactive/docs/gallery/orgchart export class OrgChart extends CoreChartBase { - draw(data: DataTable, options: OrgChartOptions): void; - draw(data: DataView, options: OrgChartOptions): void; + draw(data: DataTable | DataView, options: OrgChartOptions): void; collapse(row: number, collapsed: boolean): void; getChildrenIndexes(row: number): number[]; getCollapsedNodes(): number[]; } - // https://google-developers.appspot.com/chart/interactive/docs/gallery/orgchart#Configuration_Options + // https://developers.google.com/chart/interactive/docs/gallery/orgchart#Configuration_Options export interface OrgChartOptions { allowCollapse?: boolean; allowHtml?: boolean; diff --git a/types/got/got-tests.ts b/types/got/got-tests.ts index ea14626dc7..7857bddbab 100644 --- a/types/got/got-tests.ts +++ b/types/got/got-tests.ts @@ -173,3 +173,6 @@ got('todomvc.com', { 'user-agent': `my-module/ (https://github.com/username/my-module)` } }); + +got('https://httpbin.org/404') + .catch(err => err instanceof got.HTTPError && err.statusCode === 404); diff --git a/types/got/index.d.ts b/types/got/index.d.ts index a77ac697f4..b8b1e362e1 100644 --- a/types/got/index.d.ts +++ b/types/got/index.d.ts @@ -13,10 +13,59 @@ import * as nodeStream from 'stream'; export = got; +declare class RequestError extends StdError { + name: 'RequestError'; +} + +declare class ReadError extends StdError { + name: 'ReadError'; +} + +declare class ParseError extends StdError { + name: 'ParseError'; + statusCode: number; + statusMessage: string; +} + +declare class HTTPError extends StdError { + name: 'HTTPError'; + statusCode: number; + statusMessage: string; + headers: http.IncomingHttpHeaders; +} + +declare class MaxRedirectsError extends StdError { + name: 'MaxRedirectsError'; + statusCode: number; + statusMessage: string; + redirectUrls: string[]; +} + +declare class UnsupportedProtocolError extends StdError { + name: 'UnsupportedProtocolError'; +} + +declare class StdError extends Error { + code?: string; + host?: string; + hostname?: string; + method?: string; + path?: string; + protocol?: string; + url?: string; + response?: any; +} + declare const got: got.GotFn & Record<'get' | 'post' | 'put' | 'patch' | 'head' | 'delete', got.GotFn> & { stream: got.GotStreamFn & Record<'get' | 'post' | 'put' | 'patch' | 'head' | 'delete', got.GotStreamFn> + RequestError: typeof RequestError + ReadError: typeof ReadError + ParseError: typeof ParseError + HTTPError: typeof HTTPError + MaxRedirectsError: typeof MaxRedirectsError + UnsupportedProtocolError: typeof UnsupportedProtocolError }; declare namespace got { @@ -111,47 +160,4 @@ declare namespace got { } type GotError = RequestError | ReadError | ParseError | HTTPError | MaxRedirectsError | UnsupportedProtocolError; - - interface RequestError extends StdError { - name: 'RequestError'; - } - - interface ReadError extends StdError { - name: 'ReadError'; - } - - interface ParseError extends StdError { - name: 'ParseError'; - statusCode: number; - statusMessage: string; - } - - interface HTTPError extends StdError { - name: 'HTTPError'; - statusCode: number; - statusMessage: string; - headers: http.IncomingHttpHeaders; - } - - interface MaxRedirectsError extends StdError { - name: 'MaxRedirectsError'; - statusCode: number; - statusMessage: string; - redirectUrls: string[]; - } - - interface UnsupportedProtocolError extends StdError { - name: 'UnsupportedProtocolError'; - } - - interface StdError extends Error { - code?: string; - host?: string; - hostname?: string; - method?: string; - path?: string; - protocol?: string; - url?: string; - response?: any; - } } diff --git a/types/graphql/index.d.ts b/types/graphql/index.d.ts index e85060bab5..905dcbdd7b 100644 --- a/types/graphql/index.d.ts +++ b/types/graphql/index.d.ts @@ -7,6 +7,7 @@ // Kepennar // Mikhail Novikov // Ivan Goncharov +// Hagai Cohen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 diff --git a/types/graphql/subscription/subscribe.d.ts b/types/graphql/subscription/subscribe.d.ts index b7b40076bf..30efc010ec 100644 --- a/types/graphql/subscription/subscribe.d.ts +++ b/types/graphql/subscription/subscribe.d.ts @@ -14,7 +14,7 @@ export function subscribe( operationName?: string, fieldResolver?: GraphQLFieldResolver, subscribeFieldResolver?: GraphQLFieldResolver -): AsyncIterator; +): Promise | ExecutionResult>; export function createSourceEventStream( schema: GraphQLSchema, @@ -26,4 +26,4 @@ export function createSourceEventStream( }, operationName?: string, fieldResolver?: GraphQLFieldResolver -): AsyncIterable; +): Promise>; diff --git a/types/graphql/type/schema.d.ts b/types/graphql/type/schema.d.ts index 2d0c5c7f3d..dc07de50a7 100644 --- a/types/graphql/type/schema.d.ts +++ b/types/graphql/type/schema.d.ts @@ -51,7 +51,7 @@ export class GraphQLSchema { getMutationType(): GraphQLObjectType|null|undefined; getSubscriptionType(): GraphQLObjectType|null|undefined; getTypeMap(): { [typeName: string]: GraphQLNamedType }; - getType(name: string): GraphQLType; + getType(name: string): GraphQLNamedType; getPossibleTypes(abstractType: GraphQLAbstractType): GraphQLObjectType[]; isPossibleType( diff --git a/types/hasha/tslint.json b/types/hasha/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/hasha/tslint.json +++ b/types/hasha/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/hexo-fs/hexo-fs-tests.ts b/types/hexo-fs/hexo-fs-tests.ts new file mode 100644 index 0000000000..71e6d99e1b --- /dev/null +++ b/types/hexo-fs/hexo-fs-tests.ts @@ -0,0 +1,991 @@ +import fs = require('hexo-fs'); +import path = require('path'); +import mocha = require('mocha'); +import chai = require('chai'); +import Promise = require('bluebird'); + +const should = chai.should(); +const { join } = path; + +function createDummyFolder(path: string) { + return Promise.all([ + // Normal files in a hidden folder + fs.writeFile(join(path, '.hidden', 'a.txt'), 'a'), + fs.writeFile(join(path, '.hidden', 'b.js'), 'b'), + // Normal folder in a hidden folder + fs.writeFile(join(path, '.hidden', 'c', 'd'), 'd'), + // Top-class files + fs.writeFile(join(path, 'e.txt'), 'e'), + fs.writeFile(join(path, 'f.js'), 'f'), + // A hidden file + fs.writeFile(join(path, '.g'), 'g'), + // Files in a normal folder + fs.writeFile(join(path, 'folder', 'h.txt'), 'h'), + fs.writeFile(join(path, 'folder', 'i.js'), 'i'), + // A hidden files in a normal folder + fs.writeFile(join(path, 'folder', '.j'), 'j') + ]); +} + +const tmpDir = join(__dirname, 'fs_tmp'); + +before(() => fs.mkdirs(tmpDir)); + +after((done) => { + fs.rmdir(tmpDir); + done(); +}); + +it('exists()', () => { + return fs.exists(tmpDir).then((exist) => { + exist.should.be.true; + }); +}); + +it('exists() - callback', (callback) => { + fs.exists(tmpDir, (exist) => { + exist.should.be.true; + callback(); + }); +}); + +it('mkdirs()', () => { + const target = join(tmpDir, 'a', 'b', 'c'); + + return fs.mkdirs(target).then(() => { + return fs.exists(target); + }).then((exist) => { + exist.should.be.true; + return fs.rmdir(join(tmpDir, 'a')); + }); +}); + +it('mkdirs() - callback', (callback) => { + const target = join(tmpDir, 'a', 'b', 'c'); + + fs.mkdirs(target, (err) => { + should.not.exist(err); + + fs.exists(target, (exist) => { + exist.should.be.true; + fs.rmdir(join(tmpDir, 'a'), callback); + }); + }); +}); + +it('mkdirsSync()', () => { + const target = join(tmpDir, 'a', 'b', 'c'); + + fs.mkdirsSync(target); + + return fs.exists(target).then((exist) => { + exist.should.be.true; + return fs.rmdir(join(tmpDir, 'a')); + }); +}); + +it('writeFile()', () => { + const target = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + + return fs.writeFile(target, body).then(() => { + return fs.readFile(target); + }).then((content) => { + content.should.eql(body); + return fs.rmdir(join(tmpDir, 'a')); + }); +}); + +it('writeFile() - callback', (callback) => { + const target = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + + fs.writeFile(target, body, (err) => { + should.not.exist(err); + + fs.readFile(target, (_, content) => { + content!.should.eql(body); + fs.rmdir(join(tmpDir, 'a'), callback); + }); + }); +}); + +it('writeFileSync()', () => { + const target = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + + fs.writeFileSync(target, body); + + return fs.readFile(target).then((content) => { + content.should.eql(body); + return fs.rmdir(join(tmpDir, 'a')); + }); +}); + +it('appendFile()', () => { + const target = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + const body2 = 'bar'; + + return fs.writeFile(target, body).then(() => { + return fs.appendFile(target, body2); + }).then(() => { + return fs.readFile(target); + }).then((content) => { + content.should.eql(body + body2); + return fs.rmdir(join(tmpDir, 'a')); + }); +}); + +it('appendFile() - callback', (callback) => { + const target = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + const body2 = 'bar'; + + fs.writeFile(target, body, () => { + fs.appendFile(target, body2, (err) => { + should.not.exist(err); + + fs.readFile(target, (_, content) => { + content!.should.eql(body + body2); + fs.rmdir(join(tmpDir, 'a'), callback); + }); + }); + }); +}); + +it('appendFileSync()', () => { + const target = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + const body2 = 'bar'; + + return fs.writeFile(target, body).then(() => { + fs.appendFileSync(target, body2); + return fs.readFile(target); + }).then((content) => { + content.should.eql(body + body2); + return fs.rmdir(join(tmpDir, 'a')); + }); +}); + +it('copyFile()', () => { + const src = join(tmpDir, 'test.txt'); + const dest = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + + return fs.writeFile(src, body).then(() => { + return fs.copyFile(src, dest); + }).then(() => { + return fs.readFile(dest); + }).then((content) => { + content.should.eql(body); + + return Promise.all([ + fs.unlink(src), + fs.rmdir(join(tmpDir, 'a')) + ]); + }); +}); + +it('copyFile() - callback', (callback) => { + const src = join(tmpDir, 'test.txt'); + const dest = join(tmpDir, 'a', 'b', 'test.txt'); + const body = 'foo'; + + fs.writeFile(src, body, (err) => { + if (err) return callback(err); + + fs.copyFile(src, dest, (err) => { + if (err) return callback(err); + + fs.readFile(dest, (err, content) => { + if (err) return callback(err); + content!.should.eql(body); + + Promise.all([ + fs.unlink(src), + fs.rmdir(join(tmpDir, 'a')) + ]).asCallback(callback); + }); + }); + }); +}); + +it('copyDir()', () => { + const src = join(tmpDir, 'a'); + const dest = join(tmpDir, 'b'); + + return createDummyFolder(src).then(() => { + return fs.copyDir(src, dest); + }).then((files) => { + files.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + return Promise.all([ + fs.readFile(join(dest, 'e.txt')), + fs.readFile(join(dest, 'f.js')), + fs.readFile(join(dest, 'folder', 'h.txt')), + fs.readFile(join(dest, 'folder', 'i.js')) + ]); + }).then((result) => { + result.should.eql(['e', 'f', 'h', 'i']); + }).then(() => { + return Promise.all([ + fs.rmdir(src), + fs.rmdir(dest) + ]); + }); +}); + +it('copyDir() - callback', (callback) => { + const src = join(tmpDir, 'a'); + const dest = join(tmpDir, 'b'); + + createDummyFolder(src).then(() => { + fs.copyDir(src, dest, (err, files) => { + should.not.exist(err); + files!.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + Promise.all([ + fs.readFile(join(dest, 'e.txt')), + fs.readFile(join(dest, 'f.js')), + fs.readFile(join(dest, 'folder', 'h.txt')), + fs.readFile(join(dest, 'folder', 'i.js')) + ]).then((result) => { + result.should.eql(['e', 'f', 'h', 'i']); + }).then(() => { + return Promise.all([ + fs.rmdir(src), + fs.rmdir(dest) + ]); + }).asCallback(callback); + }); + }); +}); + +it('copyDir() - ignoreHidden off', () => { + const src = join(tmpDir, 'a'); + const dest = join(tmpDir, 'b'); + + return createDummyFolder(src).then(() => { + return fs.copyDir(src, dest, { ignoreHidden: false }); + }).then((files) => { + files.should.have.members([ + join('.hidden', 'a.txt'), + join('.hidden', 'b.js'), + join('.hidden', 'c', 'd'), + 'e.txt', + 'f.js', + '.g', + join('folder', 'h.txt'), + join('folder', 'i.js'), + join('folder', '.j') + ]); + + return Promise.all([ + fs.readFile(join(dest, '.hidden', 'a.txt')), + fs.readFile(join(dest, '.hidden', 'b.js')), + fs.readFile(join(dest, '.hidden', 'c', 'd')), + fs.readFile(join(dest, 'e.txt')), + fs.readFile(join(dest, 'f.js')), + fs.readFile(join(dest, '.g')), + fs.readFile(join(dest, 'folder', 'h.txt')), + fs.readFile(join(dest, 'folder', 'i.js')), + fs.readFile(join(dest, 'folder', '.j')) + ]); + }).then((result) => { + result.should.eql(['a', 'b', 'd', 'e', 'f', 'g', 'h', 'i', 'j']); + }).then(() => { + return Promise.all([ + fs.rmdir(src), + fs.rmdir(dest) + ]); + }); +}); + +it('copyDir() - ignorePattern', () => { + const src = join(tmpDir, 'a'); + const dest = join(tmpDir, 'b'); + + return createDummyFolder(src).then(() => { + return fs.copyDir(src, dest, { ignorePattern: /\.js/ }); + }).then((files) => { + files.should.have.members(['e.txt', join('folder', 'h.txt')]); + + return Promise.all([ + fs.readFile(join(dest, 'e.txt')), + fs.readFile(join(dest, 'folder', 'h.txt')) + ]); + }).then((result) => { + result.should.eql(['e', 'h']); + }).then(() => { + return Promise.all([ + fs.rmdir(src), + fs.rmdir(dest) + ]); + }); +}); + +it('listDir()', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.listDir(target); + }).then((files) => { + files.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + return fs.rmdir(target); + }); +}); + +it('listDir() - callback', (callback) => { + const target = join(tmpDir, 'test'); + + createDummyFolder(target).then(() => { + fs.listDir(target, (err, files) => { + if (err) return callback(err); + + files!.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + fs.rmdir(target, callback); + }); + }); +}); + +it('listDir() - ignoreHidden off', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.listDir(target, { ignoreHidden: false }); + }).then((files) => { + files.should.have.members([ + join('.hidden', 'a.txt'), + join('.hidden', 'b.js'), + join('.hidden', 'c', 'd'), + 'e.txt', + 'f.js', + '.g', + join('folder', 'h.txt'), + join('folder', 'i.js'), + join('folder', '.j') + ]); + + return fs.rmdir(target); + }); +}); + +it('listDir() - ignorePattern', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.listDir(target, { ignorePattern: /\.js/ }); + }).then((files) => { + files.should.have.members(['e.txt', join('folder', 'h.txt')]); + return fs.rmdir(target); + }); +}); + +it('listDirSync()', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + const files = fs.listDirSync(target); + files.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + return fs.rmdir(target); + }); +}); + +it('listDirSync() - ignoreHidden off', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + const files = fs.listDirSync(target, { ignoreHidden: false }); + files.should.have.members([ + join('.hidden', 'a.txt'), + join('.hidden', 'b.js'), + join('.hidden', 'c', 'd'), + 'e.txt', + 'f.js', + '.g', + join('folder', 'h.txt'), + join('folder', 'i.js'), + join('folder', '.j') + ]); + + return fs.rmdir(target); + }); +}); + +it('listDirSync() - ignorePattern', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + const files = fs.listDirSync(target, { ignorePattern: /\.js/ }); + files.should.have.members(['e.txt', join('folder', 'h.txt')]); + return fs.rmdir(target); + }); +}); + +it('readFile()', () => { + const target = join(tmpDir, 'test.txt'); + const body = 'test'; + + return fs.writeFile(target, body).then(() => { + return fs.readFile(target); + }).then((content) => { + content.should.eql(body); + return fs.unlink(target); + }); +}); + +it('readFile() - callback', (callback) => { + const target = join(tmpDir, 'test.txt'); + const body = 'test'; + + fs.writeFile(target, body, (err) => { + if (err) return callback(err); + + fs.readFile(target, (err, content) => { + if (err) return callback(err); + + content!.should.eql(body); + + fs.unlink(target).asCallback(callback); + }); + }); +}); + +it('readFile() - escape BOM', () => { + const target = join(tmpDir, 'test.txt'); + const body = '\ufefffoo'; + + return fs.writeFile(target, body).then(() => { + return fs.readFile(target); + }).then((content) => { + content.should.eql('foo'); + return fs.unlink(target); + }); +}); + +it('readFile() - escape Windows line ending', () => { + const target = join(tmpDir, 'test.txt'); + const body = 'foo\r\nbar'; + + return fs.writeFile(target, body).then(() => { + return fs.readFile(target); + }).then((content) => { + content.should.eql('foo\nbar'); + return fs.unlink(target); + }); +}); + +it('readFileSync()', () => { + const target = join(tmpDir, 'test.txt'); + const body = 'test'; + + return fs.writeFile(target, body).then(() => { + fs.readFileSync(target).should.eql(body); + return fs.unlink(target); + }); +}); + +it('readFileSync() - escape BOM', () => { + const target = join(tmpDir, 'test.txt'); + const body = '\ufefffoo'; + + return fs.writeFile(target, body).then(() => { + fs.readFileSync(target).should.eql('foo'); + return fs.unlink(target); + }); +}); + +it('readFileSync() - escape Windows line ending', () => { + const target = join(tmpDir, 'test.txt'); + const body = 'foo\r\nbar'; + + return fs.writeFile(target, body).then(() => { + fs.readFileSync(target).should.eql('foo\nbar'); + return fs.unlink(target); + }); +}); + +it('unlink()', () => { + const target = join(tmpDir, 'test-unlink'); + + return fs.writeFile(target, '').then(() => { + return fs.exists(target); + }).then((exist) => { + exist.should.eql(true); + return fs.unlink(target); + }).then(() => { + return fs.exists(target); + }).then((exist) => { + exist.should.eql(false); + }); +}); + +it('emptyDir()', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.emptyDir(target); + }).then>((files) => { + files.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + return [ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), false], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), false], + [join(target, 'folder', '.j'), true] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDir() - callback', (callback) => { + const target = join(tmpDir, 'test'); + + createDummyFolder(target).then(() => { + fs.emptyDir(target, (err, files) => { + if (err) return callback(err); + + files!.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + Promise.map<[string, boolean], void>([ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), false], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), false], + [join(target, 'folder', '.j'), true] + ], (data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }).asCallback(callback); + }); + }); +}); + +it('emptyDir() - ignoreHidden off', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.emptyDir(target, { ignoreHidden: false }); + }).then>((files) => { + files.should.have.members([ + join('.hidden', 'a.txt'), + join('.hidden', 'b.js'), + join('.hidden', 'c', 'd'), + 'e.txt', + 'f.js', + '.g', + join('folder', 'h.txt'), + join('folder', 'i.js'), + join('folder', '.j') + ]); + + return [ + [join(target, '.hidden', 'a.txt'), false], + [join(target, '.hidden', 'b.js'), false], + [join(target, '.hidden', 'c', 'd'), false], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), false], + [join(target, '.g'), false], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), false], + [join(target, 'folder', '.j'), false] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDir() - ignorePattern', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.emptyDir(target, { ignorePattern: /\.js/ }); + }).then>((files) => { + files.should.have.members(['e.txt', join('folder', 'h.txt')]); + + return [ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), true], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), true], + [join(target, 'folder', '.j'), true] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDir() - exclude', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.emptyDir(target, { exclude: ['e.txt', join('folder', 'i.js')] }); + }).then>((files) => { + files.should.have.members(['f.js', join('folder', 'h.txt')]); + + return [ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), true], + [join(target, 'f.js'), false], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), true], + [join(target, 'folder', '.j'), true] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDirSync()', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then>(() => { + const files = fs.emptyDirSync(target); + files.should.have.members([ + 'e.txt', + 'f.js', + join('folder', 'h.txt'), + join('folder', 'i.js') + ]); + + return [ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), false], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), false], + [join(target, 'folder', '.j'), true] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDirSync() - ignoreHidden off', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then>(() => { + const files = fs.emptyDirSync(target, { ignoreHidden: false }); + files.should.have.members([ + join('.hidden', 'a.txt'), + join('.hidden', 'b.js'), + join('.hidden', 'c', 'd'), + 'e.txt', + 'f.js', + '.g', + join('folder', 'h.txt'), + join('folder', 'i.js'), + join('folder', '.j') + ]); + + return [ + [join(target, '.hidden', 'a.txt'), false], + [join(target, '.hidden', 'b.js'), false], + [join(target, '.hidden', 'c', 'd'), false], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), false], + [join(target, '.g'), false], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), false], + [join(target, 'folder', '.j'), false] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDirSync() - ignorePattern', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then>(() => { + const files = fs.emptyDirSync(target, { ignorePattern: /\.js/ }); + files.should.have.members(['e.txt', join('folder', 'h.txt')]); + + return [ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), false], + [join(target, 'f.js'), true], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), true], + [join(target, 'folder', '.j'), true] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('emptyDirSync() - exclude', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then>(() => { + const files = fs.emptyDirSync(target, { exclude: ['e.txt', join('folder', 'i.js')] }); + files.should.have.members(['f.js', join('folder', 'h.txt')]); + + return [ + [join(target, '.hidden', 'a.txt'), true], + [join(target, '.hidden', 'b.js'), true], + [join(target, '.hidden', 'c', 'd'), true], + [join(target, 'e.txt'), true], + [join(target, 'f.js'), false], + [join(target, '.g'), true], + [join(target, 'folder', 'h.txt'), false], + [join(target, 'folder', 'i.js'), true], + [join(target, 'folder', '.j'), true] + ]; + }).map((data: [string, boolean]) => { + return fs.exists(data[0]).then((exist) => { + exist.should.eql(data[1]); + }); + }).then(() => { + return fs.rmdir(target); + }); +}); + +it('rmdir()', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + return fs.rmdir(target); + }).then(() => { + return fs.exists(target); + }).then((exist) => { + exist.should.be.false; + }); +}); + +it('rmdir() - callback', (callback) => { + const target = join(tmpDir, 'test'); + + createDummyFolder(target).then(() => { + fs.rmdir(target, (err) => { + should.not.exist(err); + + fs.exists(target, (exist) => { + exist.should.be.false; + callback(); + }); + }); + }); +}); + +it('rmdirSync()', () => { + const target = join(tmpDir, 'test'); + + return createDummyFolder(target).then(() => { + fs.rmdirSync(target); + return fs.exists(target); + }).then((exist) => { + exist.should.be.false; + }); +}); + +import { FSWatcher } from 'chokidar'; + +it('watch()', () => { + let watcher: FSWatcher; + + return fs.watch(tmpDir).then((watcher_) => { + watcher = watcher_; + + return new Promise((resolve, reject) => { + const path = join(tmpDir, 'test.txt'); + + watcher.on('add', (path_) => { + path_.should.eql(path); + resolve(); + }); + + fs.writeFile(path, 'test').catch(reject); + }); + }).finally(() => { + if (watcher) watcher.close(); + }); +}); + +it('ensurePath() - file exists', () => { + const target = join(tmpDir, 'test'); + + return Promise.all([ + fs.writeFile(join(target, 'foo.txt'), ''), + fs.writeFile(join(target, 'foo-1.txt'), ''), + fs.writeFile(join(target, 'foo-2.md'), ''), + fs.writeFile(join(target, 'bar.txt'), '') + ]).then(() => { + return fs.ensurePath(join(target, 'foo.txt')); + }).then((path) => { + path.should.eql(join(target, 'foo-2.txt')); + return fs.rmdir(target); + }); +}); + +it('ensurePath() - file not exist', () => { + const target = join(tmpDir, 'foo.txt'); + + return fs.ensurePath(target).then((path) => { + path.should.eql(target); + }); +}); + +it('ensurePath() - callback', (callback) => { + const target = join(tmpDir, 'test'); + + Promise.all([ + fs.writeFile(join(target, 'foo.txt'), ''), + fs.writeFile(join(target, 'foo-1.txt'), ''), + fs.writeFile(join(target, 'foo-2.md'), ''), + fs.writeFile(join(target, 'bar.txt'), '') + ]).then(() => { + fs.ensurePath(join(target, 'foo.txt'), (err, path) => { + should.not.exist(err); + path!.should.eql(join(target, 'foo-2.txt')); + fs.rmdir(target, callback); + }); + }); +}); + +it('ensurePathSync() - file exists', () => { + const target = join(tmpDir, 'test'); + + return Promise.all([ + fs.writeFile(join(target, 'foo.txt'), ''), + fs.writeFile(join(target, 'foo-1.txt'), ''), + fs.writeFile(join(target, 'foo-2.md'), ''), + fs.writeFile(join(target, 'bar.txt'), '') + ]).then(() => { + const path = fs.ensurePathSync(join(target, 'foo.txt')); + path.should.eql(join(target, 'foo-2.txt')); + + return fs.rmdir(target); + }); +}); + +it('ensurePathSync() - file not exist', () => { + const target = join(tmpDir, 'foo.txt'); + const path = fs.ensurePathSync(target); + + path.should.eql(target); +}); + +it('ensureWriteStream()', () => { + const target = join(tmpDir, 'foo', 'bar.txt'); + + return fs.ensureWriteStream(target).then((stream) => { + stream.path.should.eql(target); + stream.on('finish', () => { + return fs.unlink(target); + }); + }); +}); + +it('ensureWriteStream() - callback', (callback) => { + const target = join(tmpDir, 'foo', 'bar.txt'); + + fs.ensureWriteStream(target, (err, stream) => { + should.not.exist(err); + stream!.path.should.eql(target); + callback(); + }); +}); + +it('ensureWriteStreamSync()', () => { + const target = join(tmpDir, 'foo', 'bar.txt'); + const stream = fs.ensureWriteStreamSync(target); + + stream.path.should.eql(target); + stream.on('finish', () => { + return fs.rmdir(path.dirname(target)); + }); +}); diff --git a/types/hexo-fs/index.d.ts b/types/hexo-fs/index.d.ts new file mode 100644 index 0000000000..896fbc24eb --- /dev/null +++ b/types/hexo-fs/index.d.ts @@ -0,0 +1,436 @@ +// Type definitions for hexo-fs 0.2 +// Project: http://hexo.io/ +// Definitions by: segayuu +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import Promise = require('bluebird'); +import { + PathLike, + Stats, + ReadStream, + WriteStream, + // chmod, + chmodSync, + // fchmod, + fchmodSync, + // lchmod, + lchmodSync, + // chown, + chownSync, + // fchown, + fchownSync, + // lchown, + lchownSync, + // close, + closeSync, + createReadStream, + createWriteStream, + // fsync, + fsyncSync, + // link, + linkSync, + // mkdir, + mkdirSync, + // open, + openSync, + // symlink, + symlinkSync, + // read, + readSync, + // readdir, + readdirSync, + // readlink, + readlinkSync, + // realpath, + realpathSync, + // rename, + renameSync, + // stat, + statSync, + // fstat, + fstatSync, + // lstat, + lstatSync, + // truncate, + truncateSync, + // ftruncate, + ftruncateSync, + // unlink, + unlinkSync, + // utimes, + utimesSync, + // futimes, + futimesSync, + watchFile, + unwatchFile, + // write, + writeSync +} from 'graceful-fs'; + +export interface DirectoryOptions { + ignoreHidden?: boolean; + ignorePattern?: RegExp; +} + +export interface AppendFileOptions { + encoding?: string | null; + mode?: string | number; + flag?: string; +} + +// access +export let F_OK: number | undefined; +export let R_OK: number | undefined; +export let W_OK: number | undefined; +export let X_OK: number | undefined; + +export let access: ((path: PathLike, mode?: number) => Promise) | undefined; // promisify +export let accessSync: ((path: PathLike, mode?: number) => void) | undefined; // promisify + +// appendFile +/** + * Appends data to a file. + * @param path + * @param data + * @param callback + */ +export function appendFile(path: string, data: any, callback?: (err: any) => void): Promise; +/** + * Appends data to a file. + * @param path + * @param data + * @param options + * @param callback + */ +export function appendFile(path: string, data: any, options: string | AppendFileOptions, callback?: (err: any) => void): Promise; +/** + * Synchronous version of fs.appendFile. + * @param path + * @param data + * @param options + */ +export function appendFileSync(path: string, data: any, options?: string | AppendFileOptions): void; + +// chmod +export function chmod(path: PathLike, mode: string | number): Promise; // promisify +export function fchmod(fd: number, mode: string | number): Promise; // promisify +export function lchmod(path: PathLike, mode: string | number): Promise; // promisify +export { chmodSync, fchmodSync, lchmodSync }; + +// chown +export function chown(path: PathLike, uid: number, gid: number): Promise; // promisify +export function fchown(fd: number, uid: number, gid: number): Promise; // promisify +export function lchown(path: PathLike, uid: number, gid: number): Promise; // promisify +export { chownSync, fchownSync, lchownSync }; + +// close +export function close(fd: number): Promise; // promisify +export { closeSync }; + +// copy +/** + * Copies a directory from src to dest. It returns an array of copied files. + * @param src + * @param dest + * @param callback + */ +export function copyDir(src: string, dest: string, callback?: (err: any, value?: string[]) => void): Promise; +/** + * Copies a directory from src to dest. It returns an array of copied files. + * @param dest + * @param options + * @param callback + */ +export function copyDir(src: string, dest: string, options?: DirectoryOptions, callback?: (err: any, value?: string[]) => void): Promise; +/** + * Copies a file from src to dest. + * @param src + * @param dest + * @param callback + */ +export function copyFile(src: PathLike, dest: string, callback?: (err: any) => void): Promise; + +// createStream +export { createReadStream, createWriteStream }; + +// emptyDir +/** + * Deletes all files in a directory. It returns an array of deleted files. + * @param path + * @param callback + */ +export function emptyDir(path: string, callback?: (err: any, value?: string | string[]) => void): Promise; +export function emptyDir( + path: string, + options?: DirectoryOptions & { exclude?: string[] }, + callback?: (err: any, value?: string | string[]) => void +): Promise; +export function emptyDirSync(path: string, options?: DirectoryOptions & { exclude?: string[] }, parent?: string): string | string[]; + +// ensurePath +/** + * Ensures the given path is available to use or appends a number to the path. + * @param path + * @param callback + */ +export function ensurePath(path: string, callback?: (err: any, value?: string) => void): Promise; +/** + * Synchronous version of `fs.ensurePath`. + * @param path + */ +export function ensurePathSync(path: string): string; + +// ensureWriteStream +/** + * Creates the parent directories if they does not exist and returns a writable stream. + * @param path + * @param callback + */ +export function ensureWriteStream(path: string, callback?: (err: any, value?: WriteStream) => void): Promise; +/** + * Creates the parent directories if they does not exist and returns a writable stream. + * @param path + * @param options + * @param callback + */ +export function ensureWriteStream( + path: string, + options?: string | { + flags?: string; + defaultEncoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; + }, + callback?: (err: any, value?: WriteStream) => void +): Promise; +/** + * Synchronous version of fs.ensureWriteStream. + * @param path + * @param options + */ +export function ensureWriteStreamSync(path: string, options?: string | { + flags?: string; + defaultEncoding?: string; + fd?: number; + mode?: number; + autoClose?: boolean; + start?: number; +}): WriteStream; + +// exists +/** + * Test whether or not the given `path` exists by checking with the file system. + * @param path checking if exists. + * @param callback + */ +export function exists(path: PathLike, callback?: (exist: boolean) => void): Promise; +/** + * Synchronous version of `fs.exists`. + * @param path + */ +export function existsSync(path: PathLike): boolean; + +// fsync +export function fsync(fd: number): Promise; // promisify +export { fsyncSync }; + +// link +export function link(existingPath: PathLike, newPath: PathLike): Promise; // promisify +export { linkSync }; + +// listDir +/** + * Lists files in a directory. + * @param path + * @param callback + */ +export function listDir(path: string, callback?: (err: any, value?: string[]) => void): Promise; +/** + * Lists files in a directory. + * @param path + * @param options + * @param callback + */ +export function listDir(path: string, options?: DirectoryOptions, callback?: (err: any, value?: string[]) => void): Promise; +/** + * Synchronous version of `fs.listDir`. + * @param path + * @param options + * @param parent + */ +export function listDirSync(path: string, options?: DirectoryOptions, parent?: string): string | string[]; + +// mkdir +export function mkdir(path: PathLike, mode?: string | number): Promise; // promisify +export { mkdirSync }; + +// mkdirs +/** + * Creates a directory and its parent directories if they does not exist. + * @param path + * @param callback + */ +export function mkdirs(path: PathLike, callback?: (err: any) => void): Promise; +/** + * Synchronous version of `fs.mkdirs`. + * @param path + */ +export function mkdirsSync(path: string): void; + +// open +export function open(path: PathLike, flags: string | number, mode?: string | number | null): Promise; // promisify +export { openSync }; + +// symlink +export function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; // promisify +export { symlinkSync }; + +// read +export function read( + fd: number, + buffer: TBuffer, + offset: number, + length: number, + position: number | null +): Promise<{ bytesRead: number, buffer: TBuffer }>; // promisify +export { readSync }; + +// readdir +export function readdir(path: PathLike, options?: { encoding: BufferEncoding | null } | BufferEncoding | null): Promise; // promisify +export function readdir(path: PathLike, options: "buffer" | { encoding: "buffer" }): Promise; // promisify +export function readdir(path: PathLike, options?: { encoding?: string | null } | string | null): Promise>; // promisify +export { readdirSync }; + +// readFile +/** + * Reads the entire contents of a file. + * @param path + * @param callback + */ +export function readFile(path: PathLike | number, callback?: (err: any, value?: string) => void): Promise; +/** + * Reads the entire contents of a file. + * @param path + * @param options + * @param callback + */ +export function readFile( + path: PathLike | number, + options?: { encoding?: string; flag?: string; escape?: boolean; }, + callback?: (err: any, value?: string) => void +): Promise; +/** + * Synchronous version of `fs.readFile`. + * @param path + * @param options + */ +export function readFileSync(path: PathLike | number, options?: { encoding?: string; flag?: string; escape?: boolean; }): string; + +// readlink +export function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; // promisify +export function readlink(path: PathLike, options: { encoding: 'buffer' } | 'buffer'): Promise; // promisify +export function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; // promisify +export { readlinkSync }; + +// realpath +export function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise; // promisify +export function realpath(path: PathLike, options: { encoding: 'buffer' } | 'buffer'): Promise; // promisify +export function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise; // promisify +export { realpathSync }; + +// rename +export function rename(oldPath: PathLike, newPath: PathLike): Promise; // promisify +export { renameSync }; + +// rmdir +export function rmdir(path: string, callback?: (err: any) => void): Promise; +export function rmdirSync(path: string): void; + +// stat +export function stat(path: PathLike): Promise; // promisify +export function fstat(fd: number): Promise; // promisify +export function lstat(path: PathLike): Promise; // promisify +export { statSync, fstatSync, lstatSync }; + +// truncate +export function truncate(path: PathLike, len?: number | null): Promise; // promisify +export function ftruncate(fd: number, len?: number | null): Promise; // promisify +export { truncateSync, ftruncateSync }; + +// unlink +export function unlink(path: PathLike): Promise; // promisify +export { unlinkSync }; + +// utimes +export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise; // promisify +export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise; // promisify +export { utimesSync, futimesSync }; + +// watch +import { FSWatcher, WatchOptions } from 'chokidar'; +/** + * Watches changes of a file or a directory. + * + * See Chokidar API for more info. + * @param path + * @param options + * @param callback + */ +export function watch(path: string | string[], options?: WatchOptions, callback?: (err: any, value?: FSWatcher) => void): Promise; +export { watchFile, unwatchFile }; + +// write +export function write( + fd: number, + buffer?: TBuffer, + offset?: number, + length?: number, + position?: number | null +): Promise<{ bytesWritten: number, buffer: TBuffer }>; // promisify +export function write( + fd: number, + string: any, + position?: number | null, + encoding?: string | null +): Promise<{ bytesWritten: number, buffer: string }>; // promisify +export { writeSync }; + +// writeFile +/** + * Writes data to a file. + * @param path + * @param data + * @param callback + */ +export function writeFile(path: string, data: any, callback?: (err: any) => void): Promise; +/** + * Writes data to a file. + * @param path + * @param data + * @param options + * @param callback + */ +export function writeFile( + path: string, + data: any, + options?: string | { encoding?: string | null; mode?: string | number; flag?: string }, + callback?: (err: any) => void +): Promise; +/** + * Synchronous version of `fs.writeFile`. + * @param path + * @param data + * @param options + */ +export function writeFileSync(path: string, data: any, options?: string | { encoding?: string | null; mode?: string | number; flag?: string }): void; + +// Static classes +export let Stats: Stats; +export let ReadStream: ReadStream; +export let WriteStream: WriteStream; + +// util +export function escapeEOL(str: string): string; +export function escapeBOM(str: string): string; diff --git a/types/hexo-fs/tsconfig.json b/types/hexo-fs/tsconfig.json new file mode 100644 index 0000000000..fe667f65e4 --- /dev/null +++ b/types/hexo-fs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "hexo-fs-tests.ts" + ] +} diff --git a/types/hexo-fs/tslint.json b/types/hexo-fs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/hexo-fs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/highcharts/highstock.d.ts b/types/highcharts/highstock.d.ts index 857587ba66..79103b3464 100644 --- a/types/highcharts/highstock.d.ts +++ b/types/highcharts/highstock.d.ts @@ -1,6 +1,8 @@ // Type definitions for Highstock 2.1.5 // Project: http://www.highcharts.com/ -// Definitions by: David Deutsch + +// Definitions by: David Deutsch +// Definitions by: Dave Baumann // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as Highcharts from "highcharts"; @@ -100,6 +102,7 @@ declare namespace Highstock { interface Static extends Highcharts.Static { StockChart: Chart; + stockChart(renderTo: string | HTMLElement, options: Options, callback?: (chart: ChartObject) => void): ChartObject; } } diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index b192a5bd63..48bd7b9c76 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -575,7 +575,7 @@ declare namespace Highcharts { * categories: ['Apples', 'Bananas', 'Oranges'] * @default null */ - categories?: string[]; + categories?: any[]; /** * The highest allowed value for automatically computed axis extremes. * @since 4.0 @@ -1994,6 +1994,8 @@ declare namespace Highcharts { position?: string; top?: string; textOutline?: string; + textOverflow?: string; + whiteSpace?: string; } interface CreditsOptions { diff --git a/types/highland/highland-tests.ts b/types/highland/highland-tests.ts index 9df2443a31..af13abae0c 100644 --- a/types/highland/highland-tests.ts +++ b/types/highland/highland-tests.ts @@ -231,6 +231,8 @@ barStream = fooStream.map((x: Foo) => { barStream = fooStream.pluck(str); +fooStream = fooStream.ratelimit(3, 1000); + barStream = fooStream.reduce(bar, (memo: Bar, x: Foo) => { return memo; }); @@ -405,4 +407,4 @@ num = _.add(num, num); numCurNum = _.add(num); -//missing not \ No newline at end of file +//missing not diff --git a/types/highland/index.d.ts b/types/highland/index.d.ts index cfbeb9b3de..734939eeab 100644 --- a/types/highland/index.d.ts +++ b/types/highland/index.d.ts @@ -765,6 +765,26 @@ declare namespace Highland { */ pluck(prop: string): Stream; + /** + * Limits number of values through the stream to a maximum of number of values + * per window. Errors are not limited but allowed to pass through as soon as + * they are read from the source. + * + * @id ratelimit + * @section Transforms + * @name Stream.ratelimit(num, ms) + * @param {Number} num - the number of operations to perform per window + * @param {Number} ms - the window of time to limit the operations in (in ms) + * @api public + * + * _([1, 2, 3, 4, 5]).ratelimit(2, 100); + * + * // after 0ms => 1, 2 + * // after 100ms => 1, 2, 3, 4 + * // after 200ms => 1, 2, 3, 4, 5 + */ + ratelimit(num: number, ms: number): Stream; + /** * Boils down a Stream to a single value. The memo is the initial state * of the reduction, and each successive step of it should be returned by diff --git a/types/htmlparser2/index.d.ts b/types/htmlparser2/index.d.ts index a49e0e978a..313ff56a96 100644 --- a/types/htmlparser2/index.d.ts +++ b/types/htmlparser2/index.d.ts @@ -1,10 +1,12 @@ // Type definitions for htmlparser2 v3.7.x // Project: https://github.com/fb55/htmlparser2/ // Definitions by: James Roland Cabresos +// Linus Unnebäck // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// - +import { Writable } from 'stream' export interface Handler { onopentag?: (name: string, attribs: { [type: string]: string }) => void; @@ -60,6 +62,10 @@ export interface Options { recognizeSelfClosing?: boolean; } +export declare class WritableStream extends Writable { + constructor(handler: Handler, options?: Options); +} + export declare class Parser { constructor(handler: Handler, options?: Options); diff --git a/types/ignite-ui/index.d.ts b/types/ignite-ui/index.d.ts index d93cb1f9e6..970875a49b 100644 --- a/types/ignite-ui/index.d.ts +++ b/types/ignite-ui/index.d.ts @@ -227,6 +227,46 @@ interface DataSourceSettingsGroupby { */ defaultCollapseState?: boolean; + /** + * The name of the property that determines whether a record from the group data view is a group record. + * + */ + groupRecordKey?: string; + + /** + * The name of the property that determines whether a record from the group data view is a summary group record. + * + */ + groupSummaryRecordKey?: string; + + /** + * Array of objects containing the summaries for each field. + * Each summary object has the following format { field:"fieldName", summaryFunctions: [] }, where the summaryFunctions arrays can contain either a summary name (avg, sum, count etc.) or a custom function for caclulating a custom summary. + * + */ + summaries?: any[]; + + /** + * Specifies the postion for the summaries for each field inside each group. + * + * + * Valid values: + * "top" One summary row will be displayed at the top for each group + * "bottom" One summary row will be displayed at the bottom for each group + * "both" Two summary rows will be be display for each group. One on the top and one on the bottom. + */ + summariesPosition?: string; + + /** + * . Specifies how paging should be applied when there is at least one grouped column + * + * + * Valid values: + * "allRecords" Paging is applied for all records - data and non-data records(like group-by records) + * "dataRecordsOnly" Paging is applied ONLY for data records. Non-data records are disregarded in paging calculations. + */ + pagingMode?: string; + /** * Option for DataSourceSettingsGroupby */ @@ -531,476 +571,497 @@ interface DataSourceSettings { } declare namespace Infragistics { - class DataSource { - constructor(settings: DataSourceSettings); +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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; +} } interface IgniteUIStatic { DataSource: typeof Infragistics.DataSource; } declare namespace Infragistics { - class TypeParser { - toStr(obj: Object): void; +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; - } + /** + * L.A. 18 June 2012 Fixing bug #113265 Column 'date' shows empty values as 'NaN' + * + * @param obj + */ + toDate(obj: Object): void; + toNumber(obj: Object): void; + toBool(obj: Object): void; + isNullOrUndefined(obj: Object): void; + empty(): void; + num(): void; +} } interface DataSchemaSchemaFields { @@ -1029,6 +1090,11 @@ interface DataSchemaSchemaFields { */ mapper?: string|Function; + /** + * ParamType="function" optional="true" formatter function which accepts three parameters: val - value of the field; record - data source record; field - field definition; and return the formatted string. Formatter function is used when filtering by all fields. + */ + formatter?: any; + /** * Option for DataSchemaSchemaFields */ @@ -1059,942 +1125,1004 @@ interface DataSchemaSchema { } declare namespace Infragistics { - class DataSchema { - constructor(schema: DataSchemaSchema); +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; + /** + * 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 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; + /** + * 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[]; - } + /** + * A list of field definitions specifying the schema of the data source. + * Field objects description: {fieldName, [fieldDataType], [fieldXPath]} + */ + fields(): any[]; +} } interface IgniteUIStatic { DataSchema: typeof Infragistics.DataSchema; } declare namespace Infragistics { - class RemoteDataSource { - constructor(settings: DataSourceSettings); +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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; } +interface JSONDataSourceSettings { + /** + * Type of the data source. + */ + type?: string; + + /** + * Option for JSONDataSourceSettings + */ + [optionName: string]: any; +} + declare namespace Infragistics { - class JSONDataSource { - constructor(settings: DataSourceSettings); +class JSONDataSource { + constructor(settings: JSONDataSourceSettings); - /** - * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; @@ -2116,453 +2244,478 @@ interface RESTDataSourceSettings { } declare namespace Infragistics { - class RESTDataSource { - constructor(settings: RESTDataSourceSettings); +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; + /** + * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; @@ -2580,6 +2733,11 @@ interface JSONPDataSourceSettings { */ jsonpCallback?: string|Function; + /** + * Type of the data source. + */ + type?: string; + /** * Option for JSONPDataSourceSettings */ @@ -2587,2265 +2745,2414 @@ interface JSONPDataSourceSettings { } declare namespace Infragistics { - class JSONPDataSource { - constructor(settings: JSONPDataSourceSettings); +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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; +} } interface IgniteUIStatic { JSONPDataSource: typeof Infragistics.JSONPDataSource; } declare namespace Infragistics { - class XmlDataSource { - constructor(settings: DataSourceSettings); +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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; } +interface FunctionDataSourceSettings { + /** + * Type of the data source. + */ + type?: string; + + /** + * Option for FunctionDataSourceSettings + */ + [optionName: string]: any; +} + declare namespace Infragistics { - class FunctionDataSource { - constructor(settings: DataSourceSettings); +class FunctionDataSource { + constructor(settings: FunctionDataSourceSettings); - /** - * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; } +interface HtmlTableDataSourceSettings { + /** + * Type of the data source. + */ + type?: string; + + /** + * Option for HtmlTableDataSourceSettings + */ + [optionName: string]: any; +} + declare namespace Infragistics { - class HtmlTableDataSource { - constructor(settings: DataSourceSettings); +class HtmlTableDataSource { + constructor(settings: HtmlTableDataSourceSettings); - /** - * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; +} } interface IgniteUIStatic { HtmlTableDataSource: typeof Infragistics.HtmlTableDataSource; } declare namespace Infragistics { - class ArrayDataSource { - constructor(settings: DataSourceSettings); +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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; @@ -4869,437 +5176,462 @@ interface MashupDataSourceMashupSettings { } declare namespace Infragistics { - class MashupDataSource { - constructor(mashupSettings: MashupDataSourceMashupSettings); - constructor(settings: DataSourceSettings); +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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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 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 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 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; + /** + * 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; + /** + * 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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[]; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalFilter(): 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"}] + * example 3: [{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}] + * 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 + * To [filter by text](ig.datasource#methods:filterByText) "fieldExpressions" should have only one object with the following schema: + * + * @param fieldExpressions {filterAllFields: , expr: , fields: } + * + * ``` + * ds = new $.%%WidgetName%%({ + * type: "json", + * dataSource: adventureWorks, + * schema: jsonSchema + * }); + * ds.dataBind(); + * + * ds.filter([{fieldName : "Color", expr: "Red", cond: "Equals"}], "AND", true); + * + * // Filter by text + * ds.filter([{filterAllFields: true, expr: "abc", fields: [name: "Description", type: "string"]}]); + * ``` + * + * @param boolLogic a list of field expression definitions + * @param keepFilterState boolean logic. Accepted values are AND and OR. + * @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: any[], boolLogic: Object, keepFilterState: Object, fieldExpressionsOnStrings: Object): 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; + /** + * This clears local filtering applied to the data view by resetting it to the original data and applying any paging + */ + clearLocalFilter(): void; - /** - * 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; + /** + * 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; - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; + /** + * 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 the total number of records in the local data source - */ - totalLocalRecordsCount(): number; + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; - /** - * Returns the total number of pages - */ - pageCount(): number; + /** + * Returns the total number of records in the local data source + */ + totalLocalRecordsCount(): 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; + /** + * Returns the total number of pages + */ + pageCount(): 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; + /** + * 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; - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; + /** + * 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 next page index and rebinds the data source - */ - nextPage(): void; + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): 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; + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): 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; - /** - * 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; + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): 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; + /** + * 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; - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): 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 a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; + /** + * 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. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): 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[]; - /** - * 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; + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; + /** + * 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 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; - } + /** + * 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; @@ -5373,12 +5705,12 @@ interface HierarchicalDataSourceSettings { } declare namespace Infragistics { - class HierarchicalDataSource { - constructor(settings: HierarchicalDataSourceSettings); - dataBind(callback: Object, callee: Object): void; - root(): void; - dataAt(path: Object, keyspath: Object): void; - } +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; @@ -5496,15 +5828,27 @@ interface TreeHierarchicalDataSourceSettingsTreeDS { requestDataErrorCallback?: Function; /** + * *** IMPORTANT DEPRECATED *** Use the expandedKey option instead. * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. */ propertyExpanded?: string; /** + * *** IMPORTANT DEPRECATED *** Use the dataLevelKey option instead. * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. */ propertyDataLevel?: string; + /** + * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. + */ + expandedKey?: string; + + /** + * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. + */ + dataLevelKey?: 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) * @@ -5557,643 +5901,651 @@ interface TreeHierarchicalDataSourceSettings { } declare namespace Infragistics { - class TreeHierarchicalDataSource { - constructor(settings: TreeHierarchicalDataSourceSettings); - - /** - * Data binds to the current data source - * databinding works using the following workflow: - * 1. fire the databinding event - * 2. based on the data source type (see analyzeDataSource()), do the following: - * 3. if type is HtmlTable, parse the table and set the data and dataView respectively. - * if the type is Function, call it, apply Paging/Filtering/Sorting, and set this._dataView . If the developer wants to do his own paging, filtering or sorting - * in that case, then he should handle the PageIndexChanging and/or DataFiltering, and/or ColumnSorting client-side events, and cancel them. - * if no paging/sorting/filtering are enabled, use just this._data to save space - * if the data source is of type RemoteUrl, use jQuery's $.ajax API to trigger a remote request to the service. Use the param() API to encode the URL - * if the data source is invalid, throw an exception - * if the analyzed runtime data source type , that is, the result of analyzeDataSource(), is Unknown, check if - * the value of settings.type is set to XML or JSON. If string, eval for JSON, and parse for the XML to build the object ree - * 4. now normalize/transform the data, if a schema is supplied. This inplies any additional data type conversion - * 5. next, if OpType is Local, apply paging, sorting, and/or filtering to the data, and store the result in this._dataView - * 6. fire the databound event - * - * @param callback callback function - * @param callee callee object on which the callback will be executed. If none is specified, will assume global execution context - */ - dataBind(callback?: string, callee?: Object): void; - - /** - * Gets the passed record's parent records - * - * @param dataRow the child record. - * @param ds the data source in which to search for the related parent records. - */ - getParentRowsForRow(dataRow: Object, ds?: Object): Object; - - /** - * Gets the current data bound depth of the tree grid hierarchy. - */ - getDataBoundDepth(): void; - - /** - * Gets/Sets whether the data source has been transformed from flat to hierarchical - * - * @param isTransformed Determines if the data source is marked as transformed or not. - */ - isTransformedToHierarchicalData(isTransformed?: boolean): void; - - /** - * Transforms flat data to hierararchical data and returns the result - * - * @param data The flat data that will be transformed to hierarchical - */ - transformToHierarchicalData(data: Object): Object; - - /** - * This processes the passed data for the specified level and applies the schema transformation to it. - * - * @param data The data to be processed and transformed - * @param level The level to which the data belongs to. If this is not set it defaults to 0. - * @param suppressTransformation Determines whether the data should go through schema transformation. If true schema transofrmatin will not be applied. - */ - processDataPerLevel(data: Object, level?: number, suppressTransformation?: boolean): Object; - - /** - * Returnschild data transformed to flat data - * - * @param record The data record whose data is transformed and returned as flat - * @param level The level. If not set defaults to 0. - */ - getFlatDataForRecord(record: Object, level?: number): Object; - - /** - * Generates flat data. - * Returns an object that contains the generated flat data, the flat visible data, records count and visible records count. - * - * @param data The data record whose data is transformed. - * @param level The level from which to start recursively generating the flat data. If not set defaults to 0. - */ - generateFlatData(data: Object, level?: number): Object; - - /** - * Generates a flat data view from the current (hierarchical)data - */ - generateFlatDataView(): void; - - /** - * Returns the current flat data view - */ - flatDataView(): Object; - - /** - * Returns flat visible data. - */ - getVisibleFlatData(): Object; - - /** - * Returns flat data(without taking into account visible/expansion state). - */ - getFlatData(): Object; - - /** - * Returns total records count(without taking into account visible/expansion state). - */ - getFlatDataCount(): number; - - /** - * Sets the expanded/collapsed state of a row by its index - * - * @param index The index of the row. - * @param expanded If true then the row will be expanded. Otherwise it will be collapsed. - * @param callbackArgs Specifies a custom function to be called when the state of the row is changed. - */ - setExpandedStateByRowIndex(index: number, expanded: boolean, callbackArgs: Function): void; - - /** - * Sets the expanded state of a row by its primary key - * - * @param rowId The id of the row. - * @param expanded If true the row will be expanded. Otherwise it will be collapsed. - * @param callbackArgs Specifies a custom function to be called when the state of the row is changed. - */ - setExpandedStateByPrimaryKey(rowId: string, expanded: boolean, callbackArgs: Function): void; - - /** - * Gets whether the row with the specified id is expanded.Returns true if the row is expanded or false if it's not. - * - * @param rowId //The id of the row. - */ - getExpandStateById(rowId: string): boolean; - - /** - * Toggles the row's state by the row's id. - * - * @param rowId The id of the row. - * @param callbackArgs Specifies a custom function to be called when the state of the row is changed. - */ - toggleRow(rowId: string, callbackArgs: Function): void; - - /** - * Sorts the data source locally. The result (sorted data) can be obtained by calling dataView(). - * Remote filtering can be performed by just calling dataBind() and setting the settings.sorting.expressions - * multi-column sorting can be enabled by setting keepSortState to true. - * fields => an array of fields object definitions: - * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] - * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] - * - * @param fields an array of fields object definitions - * @param direction asc / desc direction - */ - sort(fields: Object, direction: string): void; - - /** - * Sorts the given data recursively - * fields => an array of fields object definitions: - * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] - * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] - * - * @param data the data array that will be sorted. - * @param level the level to which the data belongs to - * @param fields an array of fields object definitions - * @param direction asc / desc direction - */ - sortDataRecursive(data: Object, level: number, fields: Object, direction: string): void; - - /** - * Sorts the passed data and returns the sorted result. - * - * @param data the data to be sorted - * - * fields => an array of fields object definitions: - * example: [{fieldName : "firstName"}, {fieldName : "lastName"}] - * example 2: [{fieldIndex : 1} , {fieldIndex : 2}] - * - * @param fields an array of fields object definitions - * @param direction asc / desc direction - */ - sortData(data: Object, fields: Object, direction: string): void; - - /** - * Returns the total number of records in the local data source - */ - totalLocalRecordsCount(): number; - - /** - * Returns the total number of pages - */ - pageCount(): number; - - /** - * Returns the total number of match filtering records in the data source. - * When the dataSource is remote and filtering is applied then it is taken value - * of property "filtering.countRecords" in metatadata - if set. If it is not set returns totalRecordsCount - */ - getFilteringMatchRecordsCount(): number; - - /** - * Filters the data source locally. Remote filtering can be performed by just calling dataBind() and setting the settings.filtering.expressions. The result (filtered data) can be obtained by calling dataView() - * example: [{fieldName : "firstName", expr: "abc", cond: "StartsWith"}, {fieldName : "lastName"}] - * example 2: [{fieldIndex : 1} , {fieldIndex : 2, expr: "a", cond : "contains"}] - * expr is the filter expression text , such as "abc", or a regular expression such as *test* - * cond is the filtering condition such as startsWith, endsWith, contains, equals, doesNotEqual, doesNotContain - * if expr is detected to be a regular expression, the "cond" part is skipped - * - * @param fieldExpressions a list of field expression definitions - * @param boolLogic boolean logic. Accepted values are AND and OR. - * @param keepFilterState if keepFilterState is set to true, it will not discard previous filtering expressions - * @param fieldExpressionsOnStrings - */ - filter(fieldExpressions: Object, boolLogic: Object, keepFilterState: boolean, fieldExpressionsOnStrings: Object): void; - - /** - * Gets the count of the filtered records in the dataView - */ - getFilteredRecordsCountFromDataView(): number; - - /** - * Gets the count of the filtered records - */ - getFilteredRecordsCount(): number; - - /** - * This clears local filtering applied to the data view by resetting it to the original data and applying any paging. - */ - clearLocalFilter(): void; - - /** - * Gets whether the flat data view should be generated by calling the generateFlatDataView method. - */ - shouldCallGenerateFlatDataView(): void; - - /** - * Clears __matchFiltering property from the data record objects in the filtered data source. The __matchFiltering property determines whether a record matches the specified filtering condition. - * - * @param data the array of data objects to be cleared. If not set the current filtered data array is used. - */ - clearMatchFiltering(data?: Object): void; - - /** - * Gets the path of a record by the record or the record's key - * - * @param record the record or the record's key as string or number - */ - getPathBy(record: Object): void; - - /** - * Returns a record by a specified key (requires that primaryKey is set in the settings) - * - * @param key Primary key of the record - * @param ds the data source in which to search for the record. When not set it will use the current data source. - * @param objPath path to the object. Example: {path: '5/1'} - */ - findRecordByKey(key: Object, ds?: string, objPath?: Object): Object; - - /** - * Removes a specific record denoted by the primaryKey of the passed key parameter from the data source - * - * @param key primary key of the record - * @param origDs - */ - removeRecordByKey(key: Object, origDs: Object): void; - - /** - * Deletes a row from the data source. - * - * @param rowId the record key - primaryKey (string) or index (number) - * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log - */ - deleteRow(rowId: Object, autoCommit: boolean): Object; - - /** - * Gets the chilren records by the parent record's key in the passed data source - * - * @param key primary key of the record - * @param ds the data source - */ - getChildrenByKey(key: Object, ds: Object): Object; - - /** - * Adds a new row to the data source. Creates a transaction that can be committed / rolled back - * - * @param rowId the record key - primaryKey (string) or index (number) - * @param rowObject the new record data. - * @param rowIndex row index at which to be insert the new row - * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log - * @param parentRowId the value of the primary key of the parent row(if any) - */ - insertRow(rowId: Object, rowObject: Object, rowIndex: number, autoCommit: boolean, parentRowId: Object): Object; - - /** - * Sets a list of fields to the data source. If no parameter is specified, just returns the already existing list of fields - * - * @param fields a field has the following format: {key: 'fieldKey', dataType: 'string/number/date' } - */ - fields(fields?: Object): Object; - - /** - * Analyzes the dataSource setting to automatically determine the type of the data source. Returns the data source type. See settings.type - */ - analyzeDataSource(): string; - - /** - * Returns the current normalized/transformed and paged/filtered/sorted data, i.e. the dataView - */ - dataView(): any[]; - - /** - * Returns all of the bound data, without taking into account local paging, sorting, filtering, etc. - */ - data(): Object; - - /** - * Returns transformed data according to transformed execution: - * 1. Before paging and filtering - * 2. After filtering before paging - * 3. After filtering and paging - * - * @param transformedExecution - */ - transformedData(transformedExecution: Object): Object; - - /** - * Returns summaries data - */ - dataSummaries(): Object; - - /** - * Gets/sets the schema definition. - * - * @param s a schema object - * @param t type of the data source. See settings.type - */ - schema(s?: Object, t?: string): void; - - /** - * Gets/sets a list of paging settings - * - * @param p object holding all paging settings. See settings.paging - */ - pagingSettings(p?: Object): Object; - - /** - * Gets/sets a list of filtering settings - * - * @param f object holding all filtering settings. See settings.filtering - */ - filterSettings(f?: Object): void; - - /** - * Gets/sets a list of paging settings - * - * @param s object holding all sorting settings. See settings.sorting - */ - sortSettings(s?: Object): Object; - - /** - * Gets/sets a list of summaries settings. - * - * @param s object holding all summaries settings. See settings.summaries - */ - summariesSettings(s?: Object): void; - - /** - * Gets/sets the dataSource setting. If no parameter is specified, returns settings.dataSource - * - * @param ds - */ - dataSource(ds?: Object): Object; - - /** - * Gets/sets the type of the dataSource. If no parameter is specified, returns settings.type - * - * @param t - * @return json|xml|unknown|array|function|htmlTableString|htmlTableId|htmlTableDom|invalid|remoteUrl|empty - */ - type(t?: Object): string; - - /** - * Removes a record from the data source at specific index. - * - * @param index index of record - * @param origDs - */ - removeRecordByIndex(index: number, origDs: Object): void; - - /** - * Sets a cell value for the cell denoted by rowId and colId. Creates a transaction for the update operation and returns it - * - * @param rowId the rowId - row key (string) or index (number) - * @param colId the column id - column key (string) or index (number) - * @param val The new value - * @param autoCommit if autoCommit is true, it updates the datasource automatically and the transaction is still stored in the accumulated transaction log - */ - setCellValue(rowId: Object, colId: Object, val: Object, autoCommit: boolean): Object; - - /** - * Updates a record in the datasource. Creates a transaction that can be committed / rolled back - * - * @param rowId the record key - primaryKey (string) or index (number) - * @param rowObject the record object containing the key/value pairs we want to update. It doesn't have to include key/value pairs for all fields defined in the schema or in the data source (if no schema is defined) - * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log - */ - updateRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; - - /** - * Adds a new row to the data source. Creates a transaction that can be committed / rolled back - * - * @param rowId the record key - primaryKey (string) or index (number) - * @param rowObject the new record data. - * @param autoCommit if autoCommit is true, the datasource will be updated automatically and the transaction is still stored in the accumulated transaction log - */ - addRow(rowId: Object, rowObject: Object, autoCommit: boolean): Object; - - /** - * Adds a new node to the tree data source. Creates a transaction that can be committed / rolled back - * - * @param data the transaction data - */ - addNode(data: Object): void; - - /** - * Removes a node from the tree data source. Creates a transaction that can be committed / rolled back - * - * @param data the transaction data - */ - removeNode(data: Object): void; - - /** - * Returns a standalone object (copy) that represents the commited transactions, but detached from the data source - * - * @param t a transaction object - */ - getDetachedRecord(t: Object): Object; - - /** - * Update the data source with every transaction from the log - * - * @param id Id of the transaction to commit. If no id is specified, will commit all transactions to the data source. - */ - commit(id?: number): void; - - /** - * Clears the transaction log without updating anything in the data source - * - * @param id Record Id to find transactions for. If no id is specified, will rollback all transactions to the data source. - */ - rollback(id?: Object): void; - - /** - * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source - */ - pendingTransactions(): any[]; - - /** - * Returns a list of all transaction objects that are either pending, or have been committed in the data source. - */ - allTransactions(): any[]; - - /** - * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently - */ - transactionsAsString(): string; - - /** - * Posts to the settings.updateUrl using $.ajax, by serializing the changes as url params - * - * @param success Specifies a custom function to be called when AJAX request to the updateUrl option succeeds(optional) - * @param error Specifies a custom function to be called when AJAX request to the updateUrl option fails(optional) - */ - saveChanges(success: Function, error: Function): void; - - /** - * Gets a cell value from the record by the specified fieldName. If there's a mapper defined for the field, the resolved by the mapper value will be returned. - * - * @param fieldName the fieldName - name of the field - * @param record the record from which to get it - */ - getCellValue(fieldName: string, record: Object): Object; - - /** - * Applicable only when the data source is bound to remote data. - * Gets or sets summaries data. - * If key or dsObj are not set then returns summaries data. - * Takes summary data from passed argument dsObj(using argument key) - * - * @param key response key to take summary data(for example "Metadata.Summaries") - * @param dsObj data source object - usually contains information about data records and metadata(holds info about summaries) - */ - summariesResponse(key?: string, dsObj?: Object): Object; - - /** - * Returns filtered data if local filtering is applied. If filtering is not applied OR type of filtering is remote returns undefined. - */ - filteredData(): any[]; - - /** - * This clears local sorting applied to the data view by resetting it to the original data and applying any paging - */ - clearLocalSorting(): void; - - /** - * Applicable only when the data source is bound to remote data. - * Gets / sets the total number of records in the data source. - * If data binding is remote, and there's paging or filtering enabled, - * the actual total number of records may not - * match the number of records that exists on the client - * - * @param count the total number of records - * @param key - * @param dsObj - * @param context - */ - totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; - - /** - * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend - * - * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend - */ - hasTotalRecordsCount(hasCount: boolean): void; - - /** - * Returns metadata object for the specified key - * - * @param key Primary key of the record - */ - metadata(key: string): Object; - - /** - * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. - * - * @param index the page index. If none is specified, returns the current page index. - */ - pageIndex(index?: number): number; - - /** - * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. - * - * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. - */ - persistedPageIndex(value?: number): number; - - /** - * Sets the page index to be equal to the previous page index and rebinds the data source - */ - prevPage(): void; - - /** - * Sets the page index to be equal to the next page index and rebinds the data source - */ - nextPage(): void; - - /** - * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size - * - * @param s the page size. - */ - pageSize(s?: number): number; - - /** - * For internal use - * - * @param dirty - */ - pageSizeDirty(dirty: Object): void; - - /** - * Returns a list of records for the specified page. Implies that paging is enabled. - * - * @param p the page index for which records will be returned - */ - recordsForPage(p: number): void; - - /** - * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data - * - * @param tableDOM TABLE dom element to transform - */ - tableToObject(tableDOM: Element): Object; - - /** - * Parses the string and returns an evaluated JSON object - * - * @param s the JSON as string. - */ - stringToJSONObject(s: string): void; - - /** - * Parses a string and returns a XML Document - * - * @param s the XML represented as a string - */ - stringToXmlObject(s: string): void; - - /** - * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data - */ - groupByData(): any[]; - - /** - * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) - */ - visibleGroupByData(): any[]; - - /** - * Returns the current normalized/transformed and paged/filtered/sorted group-by data - */ - groupByDataView(): any[]; - - /** - * Toggle grouped record with the specified id and updates collections visible groupby data and data view - * - * @param id data-id attribute of the respective group row in the DOM - * @param collapsed if true the record should be collapsed, otherwise expanded - */ - toggleGroupByRecord(id: string, collapsed: boolean): void; - - /** - * Check whether the specified gorupby record is collapsed - * - * @param gbRec id of the grouped record OR grouped record - */ - isGroupByRecordCollapsed(gbRec: Object): boolean; - - /** - * Check whether grouping is applied for the specified sorting expressions. - * - * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings - */ - isGroupByApplied(exprs?: any[]): boolean; - } +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 + */ + getPathBy(record: 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 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; + + /** + * Filters the data source locally by text. If "fields" parameter is set search is performed only in the listed fields otherwise all fields are searched. + * + * @param expression a text to search for. Multiple search texts should be separated by space. When multiple search texts are provided all of them should be presented in the search fields (bool logic "and" is applied). + * @param fields an array of fields that will be searched. + */ + filterByText(expression: string, fields?: any[]): void; + + /** + * Applicable only when the data source is bound to remote data. + * Gets / sets the total number of records in the data source. + * If data binding is remote, and there's paging or filtering enabled, + * the actual total number of records may not + * match the number of records that exists on the client + * + * @param count the total number of records + * @param key + * @param dsObj + * @param context + */ + totalRecordsCount(count?: number, key?: Object, dsObj?: Object, context?: Object): number; + + /** + * Gets / sets if the response from the server contains a property which specifies the total number of records in the server-side backend + * + * @param hasCount specifies if the data source contains a property that denotes the total number of records in the server-side backend + */ + hasTotalRecordsCount(hasCount: boolean): void; + + /** + * Returns metadata object for the specified key + * + * @param key Primary key of the record + */ + metadata(key: string): Object; + + /** + * Gets /sets the current page index. If an index is passed as a parameter, the data source is re-bound. + * + * @param index the page index. If none is specified, returns the current page index. + */ + pageIndex(index?: number): number; + + /** + * Gets /sets the page index that should be persisted. For now ONLY when filtering is applied and call explicitly DataBind. + * + * @param value the page index that should be persisted. If none is specified, returns the current page index that should be persisted. + */ + persistedPageIndex(value?: number): number; + + /** + * Sets the page index to be equal to the previous page index and rebinds the data source + */ + prevPage(): void; + + /** + * Sets the page index to be equal to the next page index and rebinds the data source + */ + nextPage(): void; + + /** + * Gets /sets the page size and rebinds the data source if a parameter is specified. If no parameter is passed, returns the current page size + * + * @param s the page size. + */ + pageSize(s?: number): number; + + /** + * For internal use + * + * @param dirty + */ + pageSizeDirty(dirty: Object): void; + + /** + * Returns a list of records for the specified page. Implies that paging is enabled. + * + * @param p the page index for which records will be returned + */ + recordsForPage(p: number): void; + + /** + * Converts a HTML TABLE dom element to a JavaScript array of objects that contain the records data + * + * @param tableDOM TABLE dom element to transform + */ + tableToObject(tableDOM: Element): Object; + + /** + * Parses the string and returns an evaluated JSON object + * + * @param s the JSON as string. + */ + stringToJSONObject(s: string): void; + + /** + * Parses a string and returns a XML Document + * + * @param s the XML represented as a string + */ + stringToXmlObject(s: string): void; + + /** + * Returns collection of data and non-data(grouped) records. Flat representation of hierarchical data + */ + groupByData(): any[]; + + /** + * Returns collection of data and non-data(grouped) records. Returns only visible records(children of collapsed grouped records are not included in the collection) + */ + visibleGroupByData(): any[]; + + /** + * Returns the current normalized/transformed and paged/filtered/sorted group-by data + */ + groupByDataView(): any[]; + + /** + * Toggle grouped record with the specified id and updates collections visible groupby data and data view + * + * @param id data-id attribute of the respective group row in the DOM + * @param collapsed if true the record should be collapsed, otherwise expanded + */ + toggleGroupByRecord(id: string, collapsed: boolean): void; + + /** + * Check whether the specified gorupby record is collapsed + * + * @param gbRec id of the grouped record OR grouped record + */ + isGroupByRecordCollapsed(gbRec: Object): boolean; + + /** + * Check whether grouping is applied for the specified sorting expressions. + * + * @param exprs array of sorting expressions. If not set check expressions defined in sorting settings + */ + isGroupByApplied(exprs?: any[]): boolean; +} } interface IgniteUIStatic { TreeHierarchicalDataSource: typeof Infragistics.TreeHierarchicalDataSource; } declare namespace Infragistics { - class DvCommonWidget { - option(key: Object, value: Object): void; - } +class DvCommonWidget { + option(key: Object, value: Object): void; +} } interface SimpleTextMarkerTemplateSettings { @@ -6212,50 +6564,166 @@ interface SimpleTextMarkerTemplateSettings { } declare namespace Infragistics { - class SimpleTextMarkerTemplate { - constructor(requireThis: boolean); - constructor(settings: SimpleTextMarkerTemplateSettings); - getText(item: Object, textDelegate: Object): void; - measure(measureInfo: Object): void; - render(renderInfo: Object): void; - } +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 GridExcelExporterCallbacks { + /** + * Set a callback that is fired after the cell is exported. + * 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?: Function; + + /** + * Cancel="true" Set a callback that is fired before the cell exporting. + * 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?: Function; + + /** + * Set a callback that is fired when exporting fails. + * Use error to get the reference of error object. + * + */ + error?: Function; + + /** + * Cancel="true" Set a callback that is 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?: Function; + + /** + * Cancel="true" Set a callback that is fired when the exporting has started. + * Function takes arguments sender and args. + * Use args.grid to get reference to igGrid widget. + * + */ + exportStarting?: Function; + + /** + * Set a callback that is fired after the header cell is exported. + * 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?: Function; + + /** + * Cancel="true" Set a callback that is fired before the header cell exporting. + * 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?: Function; + + /** + * Cancel="true" Set a callback that is fired after the row is exported. + * 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?: Function; + + /** + * Cancel="true" Set a callback that is fired before the row exporting. + * 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?: Function; + + /** + * Set a callback that is fired when exporting is successful. + * Use data to get the reference of saved object. + * + */ + success?: Function; + + /** + * Set a callback that is fired after the summary is exported. + * 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?: Function; + + /** + * Cancel="true" Set a callback that is fired before the summary exporting. + * 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?: Function; + + /** + * Option for GridExcelExporterCallbacks + */ + [optionName: string]: any; +} + 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. + * 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 sorting will be applied in the excel document. - * "applied" Sorting will be applied in the excel document. + * "none" No column fixing will be applied in the excel document. + * "applied" Column fixing 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; + columnfixing?: 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. @@ -6264,17 +6732,40 @@ interface GridExcelExporterSettingsGridFeatureOptions { 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. + * 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" No column fixing will be applied in the excel document. - * "applied" Column fixing will be applied in the excel document. + * "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. */ - columnfixing?: string; + hiding?: 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 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 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. @@ -6288,8 +6779,25 @@ interface GridExcelExporterSettingsGridFeatureOptions { } interface GridExcelExporterSettings { + /** + * List of strings containing the keys for the columns that will not be exported. + * + */ + columnsToSkip?: any[]; + + /** + * 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; + /** * Specifies the name of the excel file that will be generated. + * */ fileName?: string; @@ -6298,33 +6806,10 @@ interface GridExcelExporterSettings { */ 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. @@ -6332,13 +6817,26 @@ interface GridExcelExporterSettings { gridStyling?: string; /** - * Indicates whether all sublevel data will be exported, or only data under expanded rows. + * List of strings containing the keys for the worksheet columns which will not be applied any filtering * - * Valid values: - * "allRows" All sublevel data will be exported. - * "expandedRows" Only data under expanded rows will be exported. */ - dataExportMode?: string; + skipFilteringOn?: 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; + + /** + * Specifies the name of workbook where the igGrid will be exported. + * + */ + worksheetName?: string; /** * Option for GridExcelExporterSettings @@ -6346,141 +6844,20 @@ interface GridExcelExporterSettings { [optionName: string]: any; } -interface GridExcelExporterCallbacks { - /** - * Cancel="true" Callback fired when the exporting has started. - * Function takes arguments sender and args. - * Use args.grid to get reference to igGrid widget. - */ - exportStarting?: any; - - /** - * Cancel="true" Callback fired when cell exporting has begin. - * Function takes arguments sender and args. - * Use args.columnKey to get the igGrid column key of the cell. - * Use args.columnIndex to get the igGrid column index of the cell. - * Use args.cellValue to get or set the igGrid cell value. - * Use args.rowId to get key or index of row. - * Use args.xlRow to get reference to the worksheet row. - * Use args.grid to get reference to the igGrid widget. - */ - cellExporting?: any; - - /** - * Callback fired when cell exporting has end. - * Function takes arguments sender and args. - * Use args.columnKey to get the igGrid column key of the cell. - * Use args.columnIndex to get the igGrid column index of the cell. - * Use args.cellValue to get the igGrid cell value. - * Use args.rowId to get key or index of row. - * Use args.xlRow to get reference to the worksheet row. - * Use args.grid to get reference to the igGrid widget. - */ - cellExported?: any; - - /** - * Cancel="true" Callback fired when header cell exporting has begin. - * Function takes arguments sender and args. - * Use args.headerText to get or set the igGrid column key of the header cell. - * Use args.columnKey to get the igGrid column key of the header cell. - * Use args.columnIndex to get the igGrid column index of the header cell. - */ - headerCellExporting?: any; - - /** - * Callback fired when header cell exporting has end. - * Function takes arguments sender and args. - * Use args.headerText to get the igGrid column key of the header cell. - * Use args.columnKey to get the igGrid column key of the header cell. - * Use args.columnIndex to get the igGrid column index of the header cell. - */ - headerCellExported?: any; - - /** - * Cancel="true" Callback fired when row exporting has begin. - * Function takes arguments sender and args. - * Use args.rowId to get key or index of row. - * Use args.element to get row TR element. - * Use args.xlRow to get reference to the worksheet row. - * Use args.grid to get reference to the igGrid widget. - * Note: When exporting an igHierarchicalGrid this callback is available only for the root grid rows. - */ - rowExporting?: any; - - /** - * Cancel="true" Callback fired when row exporting has ended. - * Function takes arguments sender and args. - * Use args.rowId to get key or index of row. - * Use args.element to get row TR element. - * Use args.xlRow to get reference to the worksheet row. - * Use args.grid to get reference to the igGrid widget. - * Note: When exporting an igHierarchicalGrid this callback is available only for the root grid rows. - */ - rowExported?: any; - - /** - * Cancel="true" Callback fired when summary exporting has begun. - * Function takes arguments sender and args. - * Use args.headerText to get the igGrid column header text. - * Use args.columnKey to get the igGrid column key. - * Use args.columnIndex to get the igGrid column index. - * Use args.summary to get a reference to the summary object. - * Use args.xlRowIndex to get reference to worksheet row index. - */ - summaryExporting?: any; - - /** - * Callback fired when cell exporting has end. - * Function takes arguments sender and args. - * Use args.headerText to get the igGrid column header text. - * Use args.columnKey to get the igGrid column key. - * Use args.columnIndex to get the igGrid column index. - * Use args.summary to get a reference to the summary object. - * Use args.xlRowIndex to get the worksheet row index. - */ - summaryExported?: any; - - /** - * Cancel="true" Callback fired when export is ending, but the document is not saved. - * Function takes arguments sender and args. - * Use args.grid to get reference to the igGrid widget. - * Use args.workbook to get reference to the excel workbook. - * Use args.worksheet to get reference to the excel worksheet. - */ - exportEnding?: any; - - /** - * Callback fired when exporting is successful. - * Use data to get the reference of saved object. - */ - success?: any; - - /** - * Callback fired when exporting is failed. - * Use error to get the reference of error object. - */ - error?: any; - - /** - * Option for GridExcelExporterCallbacks - */ - [optionName: string]: any; -} - declare namespace Infragistics { - class GridExcelExporter { - constructor(settings: GridExcelExporterSettings); - constructor(callbacks: GridExcelExporterCallbacks); +class GridExcelExporter { + constructor(callbacks: GridExcelExporterCallbacks); + constructor(settings: GridExcelExporterSettings); - /** - * 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; - } + /** + * 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; @@ -6617,315 +6994,315 @@ interface OlapXmlaDataSourceOptions { } declare namespace Infragistics { - class OlapXmlaDataSource { - constructor(options: OlapXmlaDataSourceOptions); +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; + /** + * 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; + /** + * Retrieves the initialization state of the data source. + */ + isInitialized(): boolean; - /** - * Indicates whether the data source is modified. - */ - isModified(): boolean; + /** + * Indicates whether the data source is modified. + */ + isModified(): boolean; - /** - * Indicates whether the update() method execution is in progress. - */ - isUpdating(): 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 currently loaded catalogs in the data source. + */ + catalogs(): any[]; - /** - * Retrieves the current catalog in the data source. - */ - catalog(): Object; + /** + * 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; + /** + * 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 currently loaded cubes in the data source. + */ + cubes(): any[]; - /** - * Retrieves the current cube in the data source. - */ - cube(): Object; + /** + * 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; + /** + * 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 currently loaded measure groups in the data source. + */ + measureGroups(): any[]; - /** - * Retrieves the current measureGroup in the data source. - */ - measureGroup(): Object; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 row axis. + */ + rowAxis(): any[]; - /** - * Returns the items in the column axis. - */ - columnAxis(): any[]; + /** + * Returns the items in the column axis. + */ + columnAxis(): any[]; - /** - * Returns the items in the filter axis. - */ - filters(): any[]; + /** + * Returns the items in the filter axis. + */ + filters(): any[]; - /** - * Returns the items in the measures axis. - */ - measures(): 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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.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.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.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.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 $.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[]; + /** + * 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; + /** + * 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 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; + /** + * 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 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 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; - } + /** + * 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; @@ -7159,342 +7536,342 @@ interface OlapFlatDataSourceOptions { } declare namespace Infragistics { - class OlapFlatDataSource { - constructor(options: OlapFlatDataSourceOptions); +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; + /** + * 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; + /** + * Retrieves the initialization state of the data source. + */ + isInitialized(): boolean; - /** - * Indicates whether the data source is modified. - */ - isModified(): boolean; + /** + * Indicates whether the data source is modified. + */ + isModified(): boolean; - /** - * Indicates whether the update() method execution is in progress. - */ - isUpdating(): 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 currently loaded cubes in the data source. + */ + cubes(): any[]; - /** - * Retrieves the current cube in the data source. - */ - cube(): Object; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 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 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 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; + /** + * 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 row axis. + */ + rowAxis(): any[]; - /** - * Returns the items in the column axis. - */ - columnAxis(): any[]; + /** + * Returns the items in the column axis. + */ + columnAxis(): any[]; - /** - * Returns the items in the filter axis. - */ - filters(): any[]; + /** + * Returns the items in the filter axis. + */ + filters(): any[]; - /** - * Returns the items in the measures axis. - */ - measures(): 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; + /** + * 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; + /** + * 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; + /** + * 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 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; + /** + * 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.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.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.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.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 $.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[]; + /** + * 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; + /** + * 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 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; + /** + * 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 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 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; - } + /** + * Returns Promise which on completion provides an array of $.ig.OlapResultAxisMember objects that are children of the current member. + * + * @param memberUniqueName the unique name of the member whose active filter members are returned. + */ + getMembersOfMember(memberUniqueName: string): void; +} } interface IgniteUIStatic { OlapFlatDataSource: typeof Infragistics.OlapFlatDataSource; } declare namespace Infragistics { - class OlapMetadataTreeItem { - /** - * Returns the OLAP metadata item that this tree item represents which is an object of type $.ig.Cube, $.ig.Dimension, $.ig.Hierarchy, $.ig.Measure, $.ig.Level. - */ - item(): Object; +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 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 caption text that should be displayed for this tree item. + */ + caption(): string; - /** - * Returns the children ot this tree item. - */ - children(): Object; - } + /** + * Returns the children ot this tree item. + */ + children(): Object; +} } interface OlapResultViewOptions { @@ -7525,35 +7902,35 @@ interface OlapResultViewOptions { } declare namespace Infragistics { - class OlapResultView { - constructor(options: OlapResultViewOptions); +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 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 $.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; - } + /** + * 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; @@ -7620,645 +7997,645 @@ interface OlapTableViewOptions { } declare namespace Infragistics { - class OlapTableView { - constructor(options: OlapTableViewOptions); +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; + /** + * 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; + /** + * 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[]; + /** + * 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[]; + /** + * 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[]; + /** + * 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 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 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 row headers. + */ + rowHeaders(): any[]; - /** - * Returns the table column headers. - */ - columnHeaders(): 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 table result cells ordered as if the grid is iterated row by row. + */ + resultCells(): any[]; - /** - * Returns the sorted $.ig.OlapResult object. - */ - result(): Object; - } + /** + * Returns the sorted $.ig.OlapResult object. + */ + result(): Object; +} } interface IgniteUIStatic { OlapTableView: typeof Infragistics.OlapTableView; } declare namespace Infragistics { - class OlapTableViewHeaderCell { - /** - * Returns the caption for the header cell. - */ - caption(): string; +class OlapTableViewHeaderCell { + /** + * Returns the caption for the header cell. + */ + caption(): string; - /** - * Returns the expaned state for the header cell. - */ - isExpanded(): boolean; + /** + * Returns the expaned state for the header cell. + */ + isExpanded(): boolean; - /** - * Indicates whether the header cell can be expanded. - */ - isExpanable(): boolean; + /** + * Indicates whether the header cell can be expanded. + */ + isExpanable(): boolean; - /** - * Returns the row index for the header cell. - */ - rowIndex(): number; + /** + * Returns the row index for the header cell. + */ + rowIndex(): number; - /** - * Returns the row span for the header cell. - */ - rowSpan(): number; + /** + * Returns the row span for the header cell. + */ + rowSpan(): number; - /** - * Returns the column index for the header cell. - */ - columnIndex(): number; + /** + * Returns the column index for the header cell. + */ + columnIndex(): number; - /** - * Returns the column span for the header cell. - */ - columnSpan(): 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 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 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; - } + /** + * Returns the index of the axis member in the tuple this header cell is related to. + */ + memberIndex(): number; +} } declare namespace Infragistics { - class OlapTableViewResultCell { - /** - * Returns the value provided by $.ig.Cell object. - */ - value(): Object; +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 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 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; - } + /** + * Returns the index of $.ig.Cell object in $.ig.OlapResult object. + */ + resultCellIndex(): number; +} } declare namespace Infragistics { - class Catalog { - /** - * Returns the name of the catalog. - * - * @param value - */ - name(value: Object): string; +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 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 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; - } + /** + * Returns the description of the catalog which is a human-readable description of the catalog + * + * @param value + */ + description(value: Object): string; +} } declare namespace Infragistics { - class Cube { - /** - * Returns the name of the cube. - * - * @param value - */ - name(value: Object): string; +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 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 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 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 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 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; - } + /** + * Returns the date and time on which the cube was last updated. + * + * @param value + */ + lastUpdated(value: Object): Object; +} } declare namespace Infragistics { - class Dimension { - /** - * Returns the name of the dimension. - * - * @param value - */ - name(value: Object): string; +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 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 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 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; - } + /** + * Returns the type of the dimension which is a value from the $.ig.DimensionType enumeration. + * + * $.ig.DimensionType.prototype.unknown = 0; + * $.ig.DimensionType.prototype.time = 1; + * $.ig.DimensionType.prototype.measure = 2; + * $.ig.DimensionType.prototype.other = 3; + * $.ig.DimensionType.prototype.quantitative = 5; + * $.ig.DimensionType.prototype.accounts = 6; + * $.ig.DimensionType.prototype.customers = 7; + * $.ig.DimensionType.prototype.products = 8; + * $.ig.DimensionType.prototype.scenario = 9; + * $.ig.DimensionType.prototype.utility = 10; + * $.ig.DimensionType.prototype.currency = 11; + * $.ig.DimensionType.prototype.rates = 12; + * $.ig.DimensionType.prototype.channel = 13; + * $.ig.DimensionType.prototype.promotion = 14; + * $.ig.DimensionType.prototype.organization = 15; + * $.ig.DimensionType.prototype.billOfMaterials = 16; + * $.ig.DimensionType.prototype.geography = 17; + * + * @param value + */ + dimensionType(value: Object): number; +} } declare namespace Infragistics { - class Hierarchy { - /** - * Returns the name of the hierarchy. - * - * @param value - */ - name(value: Object): string; +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 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 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 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 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 '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 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 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; - } + /** + * Returns the hierarchy display folder path to be used when displaying the hierarchy in the user interface. + * Folder names will be separated by a semicolon (;). Nested folders are indicated by a backslash (\). + * + * @param value + */ + hierarchyDisplayFolder(value: Object): string; +} } declare namespace Infragistics { - class Measure { - /** - * Returns the name of the measure. - * - * @param value - */ - name(value: Object): string; +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 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 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 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 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 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 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; - } + /** + * Returns the measure display folder path to be used when displaying the measure in the user interface. + * Folder names will be separated by a semicolon (;). Nested folders are indicated by a backslash (\). + * + * @param value + */ + measureDisplayFolder(value: Object): string; +} } declare namespace Infragistics { - class Level { - /** - * Returns the name of the level. - * - * @param value - */ - name(value: Object): string; +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 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 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 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 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 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 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 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 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; - } + /** + * Returns the ID of the attribute that the level is sorted on. + * + * @param value + */ + levelOrderingProperty(value: Object): number; +} } declare namespace Infragistics { - class MeasureGroup { - /** - * Returns the name of the measure group. - * - * @param value - */ - name(value: Object): string; +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 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 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 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; - } + /** + * Returns the name of the cube to which this measure group belongs + * + * @param value + */ + cubeName(value: Object): string; +} } declare namespace Infragistics { - class MeasureList { - /** - * Returns the caption of the measure list used when displaying the name of the measure list to the user. - * - * @param value - */ - caption(value: Object): string; +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[]; - } + /** + * Returns an array of $.ig.Measure objects this measure list is grouping. + * + * @param value + */ + measures(value: Object): any[]; +} } declare namespace Infragistics { - class OlapResult { - /** - * Returns a value indicating whether the result object contains any data. - * - * @param value - */ - isEmpty(value: Object): boolean; +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.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[]; - } + /** + * Returns an array of $.ig.OlapResultCell objects which hold the result data. + * + * @param value + */ + cells(value: Object): any[]; +} } interface OlapResultAxisOptions { @@ -8279,19 +8656,19 @@ interface OlapResultAxisOptions { } declare namespace Infragistics { - class OlapResultAxis { - constructor(options: OlapResultAxisOptions); +class OlapResultAxis { + constructor(options: OlapResultAxisOptions); - /** - * Returns an array of $.ig.OlapResultTuple objects which form the axis. - */ - tuples(): any[]; + /** + * 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; - } + /** + * Returns the count of the $.ig.OlapResultAxisMember objects of each tuple. + */ + tupleSize(): number; +} } interface IgniteUIStatic { OlapResultAxis: typeof Infragistics.OlapResultAxis; @@ -8310,109 +8687,109 @@ interface OlapResultTupleOptions { } declare namespace Infragistics { - class OlapResultTuple { - constructor(options: OlapResultTupleOptions); +class OlapResultTuple { + constructor(options: OlapResultTupleOptions); - /** - * Returns an array of $.ig.OlapResultTuple objects which form the axis. - */ - members(): any[]; - } + /** + * Returns an array of $.ig.OlapResultTuple objects which form the axis. + */ + members(): any[]; +} } interface IgniteUIStatic { OlapResultTuple: typeof Infragistics.OlapResultTuple; } declare namespace Infragistics { - class OlapResultAxisMember { - /** - * Returns the unique name of the axis member. - * - * @param value - */ - uniqueName(value: Object): string; +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 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 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 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; + /** + * 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; + /** + * 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 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 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 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; - } + /** + * Returns a key value map of the members' properties. By default only 'PARENT_UNIQUE_NAME' and 'CHILDREN_CARDINALITY' properties are available. + * + * @param value + */ + properties(value: Object): Object; +} } declare namespace Infragistics { - class OlapResultCell { - /** - * Returns the position of the cell when cells are iterated row by row. - * - * @param value - */ - cellOrdinal(value: Object): number; +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; - } + /** + * 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 { @@ -8423,26 +8800,26 @@ interface IgTemplatingRegExp { } declare namespace Infragistics { - class igTemplating { - constructor(regExp: IgTemplatingRegExp); +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; + /** + * 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; - } + /** + * Encoding < > ' and " + * + * @param value The string to be encoded. + */ + encode(value: string): string; +} } interface IgniteUIStatic { igTemplating: typeof Infragistics.igTemplating; @@ -8577,46 +8954,46 @@ interface IgQRCodeBarcode { * * 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. + * "version1" Version1 defines size of 21x21 namespaces for the symbol. + * "version2" Version2 defines size of 25x25 namespaces for the symbol. + * "version3" Version3 defines size of 29x29 namespaces for the symbol. + * "version4" Version4 defines size of 33x33 namespaces for the symbol. + * "version5" Version5 defines size of 37x37 namespaces for the symbol. + * "version6" Version6 defines size of 41x41 namespaces for the symbol. + * "version7" Version7 defines size of 45x45 namespaces for the symbol. + * "version8" Version8 defines size of 49x49 namespaces for the symbol. + * "version9" Version9 defines size of 53x53 namespaces for the symbol. + * "version10" Version10 defines size of 57x57 namespaces for the symbol. + * "version11" Version11 defines size of 61x61 namespaces for the symbol. + * "version12" Version12 defines size of 65x65 namespaces for the symbol. + * "version13" Version13 defines size of 69x69 namespaces for the symbol. + * "version14" Version14 defines size of 73x73 namespaces for the symbol. + * "version15" Version15 defines size of 77x77 namespaces for the symbol. + * "version16" Version16 defines size of 81x81 namespaces for the symbol. + * "version17" Version17 defines size of 85x85 namespaces for the symbol. + * "version18" Version18 defines size of 89x89 namespaces for the symbol. + * "version19" Version19 defines size of 93x93 namespaces for the symbol. + * "version20" Version20 defines size of 97x97 namespaces for the symbol. + * "version21" Version21 defines size of 101x101 namespaces for the symbol. + * "version22" Version22 defines size of 105x105 namespaces for the symbol. + * "version23" Version23 defines size of 109x109 namespaces for the symbol. + * "version24" Version24 defines size of 113x113 namespaces for the symbol. + * "version25" Version25 defines size of 117x117 namespaces for the symbol. + * "version26" Version26 defines size of 121x121 namespaces for the symbol. + * "version27" Version27 defines size of 125x125 namespaces for the symbol. + * "version28" Version28 defines size of 129x129 namespaces for the symbol. + * "version29" Version29 defines size of 133x133 namespaces for the symbol. + * "version30" Version30 defines size of 137x137 namespaces for the symbol. + * "version31" Version31 defines size of 141x141 namespaces for the symbol. + * "version32" Version32 defines size of 145x145 namespaces for the symbol. + * "version33" Version33 defines size of 149x149 namespaces for the symbol. + * "version34" Version34 defines size of 153x153 namespaces for the symbol. + * "version35" Version35 defines size of 157x157 namespaces for the symbol. + * "version36" Version36 defines size of 161x161 namespaces for the symbol. + * "version37" Version37 defines size of 165x165 namespaces for the symbol. + * "version38" Version38 defines size of 169x169 namespaces for the symbol. + * "version39" Version39 defines size of 173x173 namespaces for the symbol. + * "version40" Version40 defines size of 177x177 namespaces for the symbol. */ sizeVersion?: string; @@ -9263,7 +9640,7 @@ interface IgBaseChartMethods { /** * 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. + * 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. */ @@ -9271,7 +9648,7 @@ interface IgBaseChartMethods { /** * 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. + * 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. @@ -9281,7 +9658,7 @@ interface IgBaseChartMethods { /** * 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. + * 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. @@ -9303,6 +9680,11 @@ interface IgBaseChartMethods { * Destroys widget. */ destroy(): void; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; } interface JQuery { data(propertyName: "igBaseChart"): IgBaseChartMethods; @@ -9323,6 +9705,7 @@ interface JQuery { igBaseChart(methodName: "chart"): Object; igBaseChart(methodName: "dataBind"): void; igBaseChart(methodName: "destroy"): void; + igBaseChart(methodName: "flush"): void; /** * The width of the chart. @@ -9599,6 +9982,30 @@ interface FormatLabelEvent { } interface FormatLabelEventUIParam { + /** + * Used to obtain reference to the bullet graph widget. + */ + owner?: any; + + /** + * Used to obtain the minimum value of the bullet graph scale. + */ + actualMinimumValue?: any; + + /** + * Used to obtain the maximum value of the bullet graph scale. + */ + actualMaximumValue?: any; + + /** + * Used to obtain the value on the the bullet graph scale associated with the label. + */ + value?: any; + + /** + * Used to obtain the string value of the label. + */ + label?: any; } interface AlignLabelEvent { @@ -9606,6 +10013,50 @@ interface AlignLabelEvent { } interface AlignLabelEventUIParam { + /** + * Used to obtain reference to gauge widget. + */ + owner?: any; + + /** + * Used to obtain the minimum value of the bullet graph scale. + */ + actualMinimumValue?: any; + + /** + * Used to obtain the maximum value of the bullet graph scale. + */ + actualMaximumValue?: any; + + /** + * Used to obtain the value on the the bullet graph scale associated with the label. + */ + value?: any; + + /** + * Used to obtain the string value of the label. + */ + label?: any; + + /** + * Used to obtain the width of the label. + */ + width?: any; + + /** + * Used to obtain the height of the label. + */ + height?: any; + + /** + * Used to obtain the X offset of the label on the bullet graph scale. + */ + offsetX?: any; + + /** + * Used to obtain the Y offset of the label on the bullet graph scale. + */ + offsetY?: any; } interface IgBulletGraph { @@ -9643,11 +10094,26 @@ interface IgBulletGraph { * Gets or sets the orientation of the scale. * * Valid values: - * "horizontal" - * "vertical" + * "horizontal" The scale has a horizontal orientation. + * "vertical" The scale has a vertical orientation. */ orientation?: string; + /** + * Gets or sets the background brush for the scale. + */ + scaleBackgroundBrush?: string; + + /** + * Gets or sets the background outline for the scale. + */ + scaleBackgroundOutline?: string; + + /** + * Gets or sets the background outline thickness for the scale. + */ + scaleBackgroundThickness?: number; + /** * 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. @@ -9913,8 +10379,38 @@ interface IgBulletGraph { * Gets or sets the font. */ font?: string; + + /** + * Gets or sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. + */ pixelScalingRatio?: number; + + /** + * Event which is raised when a label of the bullet graph is formatted. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the bullet graph widget. + * Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale. + * Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale. + * Use ui.value to obtain the value on the the bullet graph scale associated with the label. + * Use ui.label to obtain the string value of the label. + */ formatLabel?: FormatLabelEvent; + + /** + * Event which is raised when a label of the bullet graph is aligned along the scale. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale. + * Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale. + * Use ui.value to obtain the value on the the bullet graph scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the bullet graph scale. + * Use ui.offsetY to obtain the Y offset of the label on the bullet graph scale. + */ alignLabel?: AlignLabelEvent; /** @@ -10067,6 +10563,42 @@ interface JQuery { */ igBulletGraph(optionLiteral: 'option', optionName: "orientation", optionValue: string): void; + /** + * Gets the background brush for the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleBackgroundBrush"): string; + + /** + * Sets the background brush for the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleBackgroundBrush", optionValue: string): void; + + /** + * Gets the background outline for the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleBackgroundOutline"): string; + + /** + * Sets the background outline for the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleBackgroundOutline", optionValue: string): void; + + /** + * Gets the background outline thickness for the scale. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleBackgroundThickness"): number; + + /** + * Sets the background outline thickness for the scale. + * + * @optionValue New value to be set. + */ + igBulletGraph(optionLiteral: 'option', optionName: "scaleBackgroundThickness", optionValue: number): 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. @@ -10700,26 +11232,74 @@ interface JQuery { igBulletGraph(optionLiteral: 'option', optionName: "font", optionValue: string): void; /** + * Gets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ igBulletGraph(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; /** + * Sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. + * + * @optionValue New value to be set. */ igBulletGraph(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; /** + * Event which is raised when a label of the bullet graph is formatted. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the bullet graph widget. + * Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale. + * Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale. + * Use ui.value to obtain the value on the the bullet graph scale associated with the label. + * Use ui.label to obtain the string value of the label. */ igBulletGraph(optionLiteral: 'option', optionName: "formatLabel"): FormatLabelEvent; /** + * Event which is raised when a label of the bullet graph is formatted. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the bullet graph widget. + * Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale. + * Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale. + * Use ui.value to obtain the value on the the bullet graph scale associated with the label. + * Use ui.label to obtain the string value of the label. + * + * @optionValue Define event handler function. */ igBulletGraph(optionLiteral: 'option', optionName: "formatLabel", optionValue: FormatLabelEvent): void; /** + * Event which is raised when a label of the bullet graph is aligned along the scale. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale. + * Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale. + * Use ui.value to obtain the value on the the bullet graph scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the bullet graph scale. + * Use ui.offsetY to obtain the Y offset of the label on the bullet graph scale. */ igBulletGraph(optionLiteral: 'option', optionName: "alignLabel"): AlignLabelEvent; /** + * Event which is raised when a label of the bullet graph is aligned along the scale. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the bullet graph scale. + * Use ui.actualMaximumValue to obtain the maximum value of the bullet graph scale. + * Use ui.value to obtain the value on the the bullet graph scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the bullet graph scale. + * Use ui.offsetY to obtain the Y offset of the label on the bullet graph scale. + * + * @optionValue Define event handler function. */ igBulletGraph(optionLiteral: 'option', optionName: "alignLabel", optionValue: AlignLabelEvent): void; igBulletGraph(options: IgBulletGraph): JQuery; @@ -10746,6 +11326,16 @@ interface IgCategoryChart { */ yAxisMaximumValue?: 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 left margin of chart title */ @@ -10838,16 +11428,6 @@ interface IgCategoryChart { */ 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 */ @@ -10873,51 +11453,31 @@ interface IgCategoryChart { */ 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 + * Gets or sets the left margin of the chart content. */ leftMargin?: number; /** - * Gets or sets the top margin of the chart content in the canvas + * Gets or sets the top margin of the chart content. */ topMargin?: number; /** - * Gets or sets the right margin of the chart content in the canvas + * Gets or sets the right margin of the chart content. */ rightMargin?: number; /** - * Gets or sets the bottom margin around the chart content in the canvas + * Gets or sets the bottom margin around the chart content. */ 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 */ @@ -10968,10 +11528,22 @@ interface IgCategoryChart { */ yAxisTitleBottomMargin?: number; + /** + * Gets or sets color of title on the X-axis + */ + xAxisTitleTextColor?: string; + + /** + * Gets or sets color of title on the Y-axis + */ + yAxisTitleTextColor?: string; + createWrappedTooltip?: any; + /** * Gets or sets the id of a template element to use for tooltips, or markup representing the tooltip template. */ tooltipTemplate?: string; + tooltipTemplates?: any; /** * Gets or sets function which takes an context object and returns a formatted label for the X-axis. @@ -10983,16 +11555,6 @@ interface IgCategoryChart { */ 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 */ @@ -11004,6 +11566,26 @@ interface IgCategoryChart { yAxisTitleTextStyle?: string; widget?: any; + /** + * 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 CSS font property for the chart subtitle + */ + subtitleTextStyle?: string; + + /** + * Gets or sets CSS font property for the chart title + */ + titleTextStyle?: string; + /** * 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. @@ -11056,12 +11638,12 @@ interface IgCategoryChart { legend?: any; /** - * Gets or sets whether the chart should perform horizontal zoom when the user initiates a mouse wheel or mouse drag operation. + * Gets or sets whether the chart can be horizontally zoomed through user interaction. */ isHorizontalZoomEnabled?: boolean; /** - * Gets or sets whether the chart should perform vertical zoom when the user initiates a mouse wheel or mouse drag operation. + * Gets or sets whether the chart can be vertically zoomed through user interaction. */ isVerticalZoomEnabled?: boolean; @@ -11086,10 +11668,10 @@ interface IgCategoryChart { * 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" + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width */ titleAlignment?: string; @@ -11097,29 +11679,29 @@ interface IgCategoryChart { * 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" + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width */ 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. + * Gets or sets the 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" + * "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 behavior for markers in each series which are placed too close together for the current view, resulting in a collision. + * Gets or sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision. * * Valid values: - * "none" - * "omit" + * "none" Collision avoidance is disabled. + * "omit" Items colliding with other items will be hidden from view. */ markerCollisionAvoidance?: string; @@ -11132,26 +11714,26 @@ interface IgCategoryChart { * 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" + * "auto" Series transitions in an automatically chosen based on type of series and its orientation + * "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; @@ -11159,11 +11741,11 @@ interface IgCategoryChart { * 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" + * "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; @@ -11192,7 +11774,7 @@ interface IgCategoryChart { xAxisOverlap?: number; /** - * Gets or sets the distance between each labels and grid line along the Y-axis. + * Gets or sets the distance between each label and grid line along the Y-axis. */ yAxisInterval?: number; @@ -11343,16 +11925,6 @@ interface IgCategoryChart { */ 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. */ @@ -11379,20 +11951,20 @@ interface IgCategoryChart { * 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" + * "none" No trend line will be displayed. + * "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; @@ -11402,13 +11974,13 @@ interface IgCategoryChart { thickness?: number; /** - * Gets or sets collection of marker shapes used for representing data points of series in this chart. + * Gets or sets the 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. + * Gets or sets the palette of brushes used as the fill color for 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; @@ -11444,10 +12016,10 @@ interface IgCategoryChart { * Gets or sets the horizontal alignment of the X-axis title. * * Valid values: - * "left" - * "center" - * "right" - * "stretch" + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width */ xAxisTitleAlignment?: string; @@ -11455,10 +12027,10 @@ interface IgCategoryChart { * Gets or sets the vertical alignment of the Y-axis title. * * Valid values: - * "top" - * "center" - * "bottom" - * "stretch" + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height */ yAxisTitleAlignment?: string; @@ -11466,10 +12038,10 @@ interface IgCategoryChart { * Gets or sets the horizontal alignment of X-axis labels. * * Valid values: - * "left" - * "center" - * "right" - * "stretch" + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width */ xAxisLabelHorizontalAlignment?: string; @@ -11477,10 +12049,10 @@ interface IgCategoryChart { * Gets or sets the horizontal alignment of Y-axis labels. * * Valid values: - * "left" - * "center" - * "right" - * "stretch" + * "left" Align the item to the left + * "center" Center the item + * "right" Align the item to the right + * "stretch" Stretch the item to the full width */ yAxisLabelHorizontalAlignment?: string; @@ -11488,10 +12060,10 @@ interface IgCategoryChart { * Gets or sets the vertical alignment of X-axis labels. * * Valid values: - * "top" - * "center" - * "bottom" - * "stretch" + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height */ xAxisLabelVerticalAlignment?: string; @@ -11499,10 +12071,10 @@ interface IgCategoryChart { * Gets or sets the vertical alignment of Y-axis labels. * * Valid values: - * "top" - * "center" - * "bottom" - * "stretch" + * "top" Align the item to the top + * "center" Center the item + * "bottom" Align the item to the bottom + * "stretch" Stretch the item to the full height */ yAxisLabelVerticalAlignment?: string; @@ -11510,8 +12082,8 @@ interface IgCategoryChart { * Gets or sets the visibility of X-axis labels. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ xAxisLabelVisibility?: string; @@ -11519,10 +12091,15 @@ interface IgCategoryChart { * Gets or sets the visibility of Y-axis labels. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ yAxisLabelVisibility?: string; + + /** + * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. + * 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. + */ negativeOutlines?: any; /** @@ -11689,7 +12266,7 @@ interface IgCategoryChartMethods { /** * 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. + * 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. */ @@ -11697,7 +12274,7 @@ interface IgCategoryChartMethods { /** * 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. + * 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. @@ -11707,7 +12284,7 @@ interface IgCategoryChartMethods { /** * 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. + * 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. @@ -11724,6 +12301,11 @@ interface IgCategoryChartMethods { * Binds data to the chart */ dataBind(): void; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; } interface JQuery { data(propertyName: "igCategoryChart"): IgCategoryChartMethods; @@ -11746,6 +12328,7 @@ interface JQuery { igCategoryChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; igCategoryChart(methodName: "chart"): Object; igCategoryChart(methodName: "dataBind"): void; + igCategoryChart(methodName: "flush"): void; /** * Gets the data value corresponding to the minimum value of the Y-axis. @@ -11771,6 +12354,30 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisMaximumValue", 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 left margin of chart title */ @@ -11991,30 +12598,6 @@ interface JQuery { */ 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 */ @@ -12075,18 +12658,6 @@ interface JQuery { */ 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 */ @@ -12100,89 +12671,53 @@ interface JQuery { 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 + * Gets the left margin of the chart content. */ igCategoryChart(optionLiteral: 'option', optionName: "leftMargin"): number; /** - * Sets the left margin of the chart content in the canvas + * Sets the left margin of the chart content. * * @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 + * Gets the top margin of the chart content. */ igCategoryChart(optionLiteral: 'option', optionName: "topMargin"): number; /** - * Sets the top margin of the chart content in the canvas + * Sets the top margin of the chart content. * * @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 + * Gets the right margin of the chart content. */ igCategoryChart(optionLiteral: 'option', optionName: "rightMargin"): number; /** - * Sets the right margin of the chart content in the canvas + * Sets the right margin of the chart content. * * @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 + * Gets the bottom margin around the chart content. */ igCategoryChart(optionLiteral: 'option', optionName: "bottomMargin"): number; /** - * Sets the bottom margin around the chart content in the canvas + * Sets the bottom margin around the chart content. * * @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 */ @@ -12303,6 +12838,38 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "yAxisTitleBottomMargin", optionValue: number): 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; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "createWrappedTooltip"): any; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "createWrappedTooltip", optionValue: any): void; + /** * Gets the id of a template element to use for tooltips, or markup representing the tooltip template. */ @@ -12315,6 +12882,14 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplates"): any; + + /** + */ + igCategoryChart(optionLiteral: 'option', optionName: "tooltipTemplates", optionValue: any): void; + /** * Gets function which takes an context object and returns a formatted label for the X-axis. */ @@ -12339,30 +12914,6 @@ interface JQuery { */ 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 */ @@ -12395,6 +12946,54 @@ interface JQuery { */ igCategoryChart(optionLiteral: 'option', optionName: "widget", optionValue: any): 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 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 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 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. @@ -12488,24 +13087,24 @@ interface JQuery { 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. + * Gets whether the chart can be horizontally zoomed through user interaction. */ 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. + * Sets whether the chart can be horizontally zoomed through user interaction. * * @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. + * Gets whether the chart can be vertically zoomed through user interaction. */ 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. + * Sets whether the chart can be vertically zoomed through user interaction. * * @optionValue New value to be set. */ @@ -12576,13 +13175,13 @@ interface JQuery { 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. + * Gets the 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. + * Sets the 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. @@ -12590,12 +13189,12 @@ interface JQuery { 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. + * Gets the 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. + * Sets the 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. */ @@ -12694,12 +13293,12 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "xAxisOverlap", optionValue: number): void; /** - * Gets the distance between each labels and grid line along the Y-axis. + * Gets the distance between each label 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. + * Sets the distance between each label and grid line along the Y-axis. * * @optionValue New value to be set. */ @@ -13057,30 +13656,6 @@ interface JQuery { */ 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. */ @@ -13158,13 +13733,13 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "thickness", optionValue: number): void; /** - * Gets collection of marker shapes used for representing data points of series in this chart. + * Gets the 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. + * Sets the 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. @@ -13172,13 +13747,13 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "markerTypes", optionValue: any): void; /** - * Gets the palette of brushes used for coloring fill of data point markers. + * Gets the palette of brushes used as the fill color for 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. + * Sets the palette of brushes used as the fill color for 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. @@ -13346,10 +13921,16 @@ interface JQuery { igCategoryChart(optionLiteral: 'option', optionName: "yAxisLabelVisibility", optionValue: string): void; /** + * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. + * 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: "negativeOutlines"): any; /** + * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall. + * 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: "negativeOutlines", optionValue: any): void; @@ -13780,7 +14361,7 @@ interface IgDataChartAxes { coercionMethods?: any; /** - * Gets or sets the axis label format string. + * Gets or sets the label mapping property to use for axis labels. */ label?: any; @@ -15569,15 +16150,25 @@ interface IgDataChart { windowRect?: any; /** - * Gets or sets the current Chart's horizontal zoomability. + * Gets or sets the current Chart's horizontal zoomability. This option is deprecated - please use `isHorizontalZoomEnabled` instead. */ horizontalZoomable?: boolean; /** - * Gets or sets the current Chart's vertical zoomability. + * Gets or sets the current Chart's vertical zoomability. This option is deprecated - please use `isVerticalZoomEnabled` instead. */ verticalZoomable?: boolean; + /** + * Gets or sets the current Chart's horizontal zoomability. + */ + isHorizontalZoomEnabled?: boolean; + + /** + * Gets or sets the current Chart's vertical zoomability. + */ + isVerticalZoomEnabled?: 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. * @@ -16362,7 +16953,7 @@ interface IgDataChartMethods { /** * 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. + * 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. */ @@ -16370,7 +16961,7 @@ interface IgDataChartMethods { /** * 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. + * 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. @@ -16380,7 +16971,7 @@ interface IgDataChartMethods { /** * 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. + * 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. @@ -16398,7 +16989,7 @@ interface IgDataChartMethods { /** * 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. + * 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. @@ -16407,7 +16998,7 @@ interface IgDataChartMethods { /** * 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. + * 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. @@ -16452,6 +17043,13 @@ interface IgDataChartMethods { */ getActualMaximumValue(targetName: string): void; + /** + * Gets the actual interval of the target numeric or date time axis + * + * @param targetName The name of the axis from which to get the interval. + */ + getActualInterval(targetName: string): void; + /** * Creates a print preview page with the chart, hiding all other elements on the page. */ @@ -16890,6 +17488,11 @@ interface IgPieChart { */ labelMemberPath?: string; + /** + * Gets or sets the property name that contains the legend labels. + */ + legendLabelMemberPath?: string; + /** * Gets or Sets the property name that contains the values. */ @@ -17286,6 +17889,16 @@ interface IgPieChartMethods { * Exports visual data from the pie chart to aid in unit testing */ exportVisualData(): void; + + /** + * Returns data that the pie chart is bound to. + */ + getData(): Object; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; } interface JQuery { data(propertyName: "igPieChart"): IgPieChartMethods; @@ -17316,6 +17929,7 @@ interface JQuery { igDataChart(methodName: "exportVisualData"): void; igDataChart(methodName: "getActualMinimumValue", targetName: string): void; igDataChart(methodName: "getActualMaximumValue", targetName: string): void; + igDataChart(methodName: "getActualInterval", targetName: string): void; igDataChart(methodName: "print"): void; igDataChart(methodName: "renderSeries", targetName: string, animate: boolean): void; igDataChart(methodName: "getItemIndex", targetName: string, worldPoint: Object): number; @@ -17429,28 +18043,52 @@ interface JQuery { igDataChart(optionLiteral: 'option', optionName: "windowRect", optionValue: any): void; /** - * Gets the current Chart's horizontal zoomability. + * Gets the current Chart's horizontal zoomability. This option is deprecated - please use `isHorizontalZoomEnabled` instead. */ igDataChart(optionLiteral: 'option', optionName: "horizontalZoomable"): boolean; /** - * Sets the current Chart's horizontal zoomability. + * Sets the current Chart's horizontal zoomability. This option is deprecated - please use `isHorizontalZoomEnabled` instead. * * @optionValue New value to be set. */ igDataChart(optionLiteral: 'option', optionName: "horizontalZoomable", optionValue: boolean): void; /** - * Gets the current Chart's vertical zoomability. + * Gets the current Chart's vertical zoomability. This option is deprecated - please use `isVerticalZoomEnabled` instead. */ igDataChart(optionLiteral: 'option', optionName: "verticalZoomable"): boolean; + /** + * Sets the current Chart's vertical zoomability. This option is deprecated - please use `isVerticalZoomEnabled` instead. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "verticalZoomable", optionValue: boolean): void; + + /** + * Gets the current Chart's horizontal zoomability. + */ + igDataChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled"): boolean; + + /** + * Sets the current Chart's horizontal zoomability. + * + * @optionValue New value to be set. + */ + igDataChart(optionLiteral: 'option', optionName: "isHorizontalZoomEnabled", optionValue: boolean): void; + + /** + * Gets the current Chart's vertical zoomability. + */ + igDataChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled"): boolean; + /** * Sets the current Chart's vertical zoomability. * * @optionValue New value to be set. */ - igDataChart(optionLiteral: 'option', optionName: "verticalZoomable", optionValue: boolean): void; + igDataChart(optionLiteral: 'option', optionName: "isVerticalZoomEnabled", 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. @@ -18939,6 +19577,8 @@ interface JQuery { igPieChart(methodName: "widget"): void; igPieChart(methodName: "print"): void; igPieChart(methodName: "exportVisualData"): void; + igPieChart(methodName: "getData"): Object; + igPieChart(methodName: "flush"): void; /** * The width of the chart. It can be set as a number in pixels, string (px) or percentage (%). @@ -19036,6 +19676,18 @@ interface JQuery { */ igPieChart(optionLiteral: 'option', optionName: "labelMemberPath", optionValue: string): void; + /** + * Gets the property name that contains the legend labels. + */ + igPieChart(optionLiteral: 'option', optionName: "legendLabelMemberPath"): string; + + /** + * Sets the property name that contains the legend labels. + * + * @optionValue New value to be set. + */ + igPieChart(optionLiteral: 'option', optionName: "legendLabelMemberPath", optionValue: string): void; + /** * Gets or Sets the property name that contains the values. */ @@ -21444,8 +22096,8 @@ interface IgComboMethods { /** * 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. + * 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; @@ -21566,14 +22218,14 @@ interface IgComboMethods { * * @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. + * 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; @@ -21583,14 +22235,14 @@ interface IgComboMethods { * * @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. + * 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; @@ -21600,14 +22252,14 @@ interface IgComboMethods { * * @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. + * 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; @@ -21616,13 +22268,13 @@ interface IgComboMethods { * 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. + * 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; @@ -21632,8 +22284,8 @@ interface IgComboMethods { * * @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. + * 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; @@ -21643,8 +22295,8 @@ interface IgComboMethods { * * @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. + * 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; @@ -21654,8 +22306,8 @@ interface IgComboMethods { * * @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. + * 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; @@ -21664,8 +22316,8 @@ interface IgComboMethods { * 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. + * 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; @@ -21871,14 +22523,14 @@ interface JQuery { /** * 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. + * [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. + * [enabled](ui.igcombo#options:loadOnDemandSettings.enabled) and its [type](ui.igcombo#options:filteringType) is remote. * * * @optionValue New value to be set. @@ -21985,14 +22637,14 @@ interface JQuery { /** * 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. + * 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. + * More info on the templating engine can be found here: http://www.igniteui.com/help/infragistics-templating-engine. * * * @optionValue New value to be set. @@ -23334,7 +23986,7 @@ interface IgDialogMethods { /** * Gets/Sets the state of the editor. - * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. * * @param state New state. */ @@ -23347,10 +23999,10 @@ interface IgDialogMethods { /** * 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. + * 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. */ @@ -23358,42 +24010,42 @@ interface IgDialogMethods { /** * 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. + * 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. + * 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. + * 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. + * 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. + * 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. + * Note: If the state of the dialog changes, then stateChanging and stateChanged events are raised. */ unpin(): Object; @@ -24255,11 +24907,11 @@ interface IgDoughnutChartSeries { * Gets or sets the position of chart labels. * * Valid values: - * "none" - * "center" - * "insideEnd" - * "outsideEnd" - * "bestFit" + * "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; @@ -24267,8 +24919,8 @@ interface IgDoughnutChartSeries { * Gets or sets whether the leader lines are visible. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ leaderLineVisibility?: string; @@ -24281,9 +24933,9 @@ interface IgDoughnutChartSeries { * Gets or sets what type of leader lines will be used for the outside end labels. * * Valid values: - * "straight" - * "arc" - * "spline" + * "straight" A straight line is drawn between the slice and its label. + * "arc" A curved line is drawn between the slice and its label. The line follows makes a natural turn from the slice to the label. + * "spline" A curved line is drawn between the slice and its label. The line starts radially from the slice and then turns to the label. */ leaderLineType?: string; @@ -24301,8 +24953,8 @@ interface IgDoughnutChartSeries { * Gets or sets whether to use numeric or percent-based threshold value. * * Valid values: - * "number" - * "percent" + * "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; @@ -24327,7 +24979,7 @@ interface IgDoughnutChartSeries { formatLegendLabel?: any; /** - * Gets or sets the pixel amount, by which the labels are offset from the edge of the slices. + * Gets or sets the pixel amount by which the labels are offset from the edge of the slices. */ labelExtent?: number; @@ -24343,15 +24995,13 @@ interface IgDoughnutChartSeries { selectedStyle?: any; /** - * Gets or sets the Brushes property. - * The brushes property defines the palette from which automatically assigned slice brushes are selected. + * Gets or sets the palette of brushes to use for coloring the slices. * 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. + * Gets or sets the palette of brushes to use for outlines on the slices. * 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; @@ -24614,6 +25264,13 @@ interface IgDoughnutChartMethods { */ destroy(): void; + /** + * Returns data source of the series. + * + * @param series Optional. The series name. If not provided an array of series data sources is returned. + */ + getData(series: string): Object; + /** * Find index of item within actual data used by chart. * @@ -24628,11 +25285,6 @@ interface IgDoughnutChartMethods { */ 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. * @@ -24675,7 +25327,7 @@ interface IgDoughnutChartMethods { /** * 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. + * 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. */ @@ -24683,7 +25335,7 @@ interface IgDoughnutChartMethods { /** * 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. + * 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. @@ -24693,7 +25345,7 @@ interface IgDoughnutChartMethods { /** * 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. + * 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. @@ -24724,9 +25376,9 @@ interface JQuery { igDoughnutChart(methodName: "exportVisualData"): Object; igDoughnutChart(methodName: "flush"): void; igDoughnutChart(methodName: "destroy"): void; + igDoughnutChart(methodName: "getData", series: string): Object; 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; @@ -25822,7 +26474,7 @@ interface IgTextEditor { /** * 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. + * Items in the list can be of type string. * */ listItems?: any[]; @@ -25922,13 +26574,13 @@ interface IgTextEditor { 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. + * Gets/Sets the ability of the editor to automatically move the dropdown list selection item from one end to the opposite side. When the last item is reached and spin down is performed, the first item gets selected 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 + * Gets/Sets if the editor should only allow values from the list of items. Matching is case-insensitive. * */ isLimitedToListValues?: boolean; @@ -26324,7 +26976,7 @@ interface IgTextEditorMethods { 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. + * Gets the selected text from the editor in edit mode. This can be done inside key event handlers, like keydown or keyup. This method can be used only when the editor is focused. If you invoke this method in display mode, when the editor input is blurred, the returned value will be an empty string. */ getSelectedText(): string; @@ -26340,7 +26992,7 @@ interface IgTextEditorMethods { /** * 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. + * Note: The method raises [textChanged](ui.igtexteditor#events:textChanged) event. * * @param string The string to be inserted. */ @@ -26355,12 +27007,12 @@ interface IgTextEditorMethods { select(start: number, end: number): void; /** - * Hovers the previous item in the drop-down list if the list is opened. + * Selects the previous item from the drop-down list. */ spinUp(): void; /** - * Hovers the next item in the drop-down list if the list is opened. + * Selects the next item from the drop-down list. */ spinDown(): void; @@ -26441,7 +27093,7 @@ interface JQuery { 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. + * Items in the list can be of type number. * */ listItems?: any[]; @@ -26456,6 +27108,7 @@ interface IgNumericEditor { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * */ negativeSign?: string; @@ -26472,6 +27125,7 @@ interface IgNumericEditor { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ decimalSeparator?: string; @@ -26479,8 +27133,9 @@ interface IgNumericEditor { /** * 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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ groupSeparator?: string; @@ -26491,32 +27146,42 @@ interface IgNumericEditor { * 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: The numbers in the array must be positive integers. + * 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). + * Gets/Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ maxDecimals?: number; /** - * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * Gets/Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ minDecimals?: number; + /** + * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + */ + roundDecimals?: boolean; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -26575,7 +27240,7 @@ interface IgNumericEditor { spinDelta?: number; /** - * Gets/Sets support for scientific format in edit mode. + * Gets/Sets support for scientific format. * 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. * @@ -26592,10 +27257,17 @@ interface IgNumericEditor { /** * 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * */ spinWrapAround?: boolean; + /** + * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + */ + isLimitedToListValues?: boolean; + /** * Removed from numeric editor options */ @@ -26699,12 +27371,6 @@ interface IgNumericEditor { */ 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. * @@ -26894,26 +27560,26 @@ interface IgNumericEditorMethods { getSelectionEnd(): void; /** - * Increments value in editor according to the parameter. + * Increments value in editor according to the parameter or selects the previous item from the drop-down list if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * @param delta Increments value. */ spinUp(delta?: number): void; /** - * Decrements value in editor according to the parameter. + * Decrements value in editor according to the parameter selects the next item from the drop-down list if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * @param delta Decrement value. */ spinDown(delta?: number): void; /** - * Moves the hovered index to the item that appears above the current one in the list. + * This method is deprecated in favor of [spinUp](ui.%%WidgetNameLowered%%#options:spinUp). */ selectListIndexUp(): void; /** - * Moves the hovered index to the item that appears above the current one in the list. + * This method is deprecated in favor of [spinDown](ui.%%WidgetNameLowered%%#options:spinDown). */ selectListIndexDown(): void; @@ -26971,7 +27637,7 @@ interface IgNumericEditorMethods { /** * 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. + * Note: The method raises [textChanged](ui.igtexteditor#events:textChanged) event. * * @param string The string to be inserted. */ @@ -27016,7 +27682,7 @@ interface IgCurrencyEditor { /** * 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. + * Items in the list can be of type number. * */ listItems?: any[]; @@ -27031,6 +27697,7 @@ interface IgCurrencyEditor { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * */ negativeSign?: string; @@ -27047,6 +27714,7 @@ interface IgCurrencyEditor { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ decimalSeparator?: string; @@ -27054,8 +27722,9 @@ interface IgCurrencyEditor { /** * 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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ groupSeparator?: string; @@ -27066,32 +27735,42 @@ interface IgCurrencyEditor { * 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: The numbers in the array must be positive integers. + * 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). + * Gets/Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ maxDecimals?: number; /** - * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * Gets/Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ minDecimals?: number; + /** + * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + */ + roundDecimals?: boolean; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -27150,7 +27829,7 @@ interface IgCurrencyEditor { spinDelta?: number; /** - * Gets/Sets support for scientific format in edit mode. + * Gets/Sets support for scientific format. * 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. * @@ -27167,10 +27846,17 @@ interface IgCurrencyEditor { /** * 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * */ spinWrapAround?: boolean; + /** + * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + */ + isLimitedToListValues?: boolean; + /** * Removed from numeric editor options */ @@ -27274,12 +27960,6 @@ interface IgCurrencyEditor { */ 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. * @@ -27410,26 +28090,26 @@ interface IgCurrencyEditorMethods { getSelectionEnd(): void; /** - * Increments value in editor according to the parameter. + * Increments value in editor according to the parameter or selects the previous item from the drop-down list if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * @param delta Increments value. */ spinUp(delta?: number): void; /** - * Decrements value in editor according to the parameter. + * Decrements value in editor according to the parameter selects the next item from the drop-down list if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * @param delta Decrement value. */ spinDown(delta?: number): void; /** - * Moves the hovered index to the item that appears above the current one in the list. + * This method is deprecated in favor of [spinUp](ui.%%WidgetNameLowered%%#options:spinUp). */ selectListIndexUp(): void; /** - * Moves the hovered index to the item that appears above the current one in the list. + * This method is deprecated in favor of [spinDown](ui.%%WidgetNameLowered%%#options:spinDown). */ selectListIndexDown(): void; @@ -27497,7 +28177,7 @@ interface IgPercentEditor { /** * 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. + * Items in the list can be of type number. * */ listItems?: any[]; @@ -27512,6 +28192,7 @@ interface IgPercentEditor { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * */ negativeSign?: string; @@ -27528,6 +28209,7 @@ interface IgPercentEditor { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ decimalSeparator?: string; @@ -27535,8 +28217,9 @@ interface IgPercentEditor { /** * 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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ groupSeparator?: string; @@ -27547,32 +28230,42 @@ interface IgPercentEditor { * 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: The numbers in the array must be positive integers. + * 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). + * Gets/Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ maxDecimals?: number; /** - * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * Gets/Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ minDecimals?: number; + /** + * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + */ + roundDecimals?: boolean; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -27604,7 +28297,7 @@ interface IgPercentEditor { allowNullValue?: boolean; /** - * Gets/Sets support for scientific format in edit mode. + * Gets/Sets support for scientific format. * 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. * @@ -27621,10 +28314,17 @@ interface IgPercentEditor { /** * 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * */ spinWrapAround?: boolean; + /** + * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + */ + isLimitedToListValues?: boolean; + /** * Removed from numeric editor options */ @@ -27728,12 +28428,6 @@ interface IgPercentEditor { */ 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. * @@ -27841,7 +28535,7 @@ interface IgPercentEditor { 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. + * Note: the method raises the [textChanged](ui.igpercenteditor#events:textChanged) event. * * @param string The string to be inserted. */ @@ -27872,26 +28566,26 @@ interface IgPercentEditorMethods { getSelectionEnd(): void; /** - * Increments value in editor according to the parameter. + * Increments value in editor according to the parameter or selects the previous item from the drop-down list if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * @param delta Increments value. */ spinUp(delta?: number): void; /** - * Decrements value in editor according to the parameter. + * Decrements value in editor according to the parameter selects the next item from the drop-down list if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * @param delta Decrement value. */ spinDown(delta?: number): void; /** - * Moves the hovered index to the item that appears above the current one in the list. + * This method is deprecated in favor of [spinUp](ui.%%WidgetNameLowered%%#options:spinUp). */ selectListIndexUp(): void; /** - * Moves the hovered index to the item that appears above the current one in the list. + * This method is deprecated in favor of [spinDown](ui.%%WidgetNameLowered%%#options:spinDown). */ selectListIndexDown(): void; @@ -27914,7 +28608,9 @@ interface IgMaskEditor { /** * 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. + * + * Valid values: + * "clear" A button to clear the value is located on the right side of the editor. */ buttonType?: string; @@ -27941,7 +28637,7 @@ interface IgMaskEditor { 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. + * It affects the value of the control (value method/option and submitted in forms). It defines what the value should contain from text, unfilled prompts and literals. The default is allText and when used value method/option returns the text entered, all prompts (positions) and literals. * * * Valid values: @@ -27961,7 +28657,7 @@ interface IgMaskEditor { 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. + * Gets/Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). * */ padChar?: string; @@ -28247,7 +28943,7 @@ interface IgMaskEditorMethods { 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. + * Gets the selected text from the editor in edit mode. This can be done inside key event handlers, like keydown or keyup. This method can be used only when the editor is focused. If you invoke this method in display mode, when the editor input is blurred, the returned value will be an empty string. */ getSelectedText(): string; @@ -28263,7 +28959,7 @@ interface IgMaskEditorMethods { /** * 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. + * Note: The method raises [textChanged](ui.igtexteditor#events:textChanged) event. * * @param string The string to be inserted. */ @@ -28284,21 +28980,21 @@ interface JQuery { 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * */ maxValue?: Object; @@ -28377,17 +29073,27 @@ interface IgDateEditor { 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. + * Gets the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" * * * 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). + * "date" The value method returns a Date object. When this mode is set the value sent to the server on submit is serialized as ISO 8061 string with local time and zone values by default. + * "displayModeText" The "text" in display mode (no focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). + * "editModeText" The "text" in edit mode (focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). */ dataMode?: string; + /** + * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. + * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. + * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * + */ + displayTimeOffset?: any; + /** * Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. * @@ -28399,7 +29105,10 @@ interface IgDateEditor { 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. + * Gets/Sets delta-value which is used to increment or decrement the editor date on spin actions. + * When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * The value can be only a positive integer number, otherwise it will be set as 1, or in the cases with double or float the the whole part will be taken. * */ spinDelta?: number; @@ -28413,14 +29122,8 @@ interface IgDateEditor { 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. + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * */ enableUTCDates?: boolean; @@ -28443,7 +29146,7 @@ interface IgDateEditor { * 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; + nullValue?: string|number|Date; /** * This option is inherited from a parent widget and it's not applicable for igDateEditor @@ -28711,19 +29414,21 @@ interface IgDateEditorMethods { /** * Gets/Sets editor value. * - * Note! This option doesn't use the displayInputFormat to extract the date + * Note! This option doesn't use the dateInputFormat 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. + * Gets selected date as a date object. This method can be used when dataMode is set as either displayModeText or editModeText. + * In such cases the value() method will not return date object and getSelectedDate() can be used to replace that functionality. */ getSelectedDate(): Object; /** - * Sets selected date. + * Sets selected date. This method can be used when dataMode is set as either displayModeText or editModeText. + * In such cases the value() cannot accept a date object as a new value and getSelectedDate() can be used to replace that functionality. * * @param date */ @@ -28854,21 +29559,21 @@ interface IgDatePicker { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * */ maxValue?: Object; @@ -28947,19 +29652,32 @@ interface IgDatePicker { 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. + * Gets the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" * * * 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). + * "date" The value method returns a Date object. When this mode is set the value sent to the server on submit is serialized as ISO 8061 string with local time and zone values by default. + * "displayModeText" The "text" in display mode (no focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). + * "editModeText" The "text" in edit mode (focus) format (pattern) is used to be send to the server and is returned from the value() method (returns a string object). */ 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. + * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. + * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. + * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * + */ + displayTimeOffset?: any; + + /** + * Gets/Sets delta-value which is used to increment or decrement the editor date on spin actions. + * When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * The value can be only a positive integer number, otherwise it will be set as 1, or in the cases with double or float the the whole part will be taken. * */ spinDelta?: number; @@ -28973,14 +29691,8 @@ interface IgDatePicker { 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. + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * */ enableUTCDates?: boolean; @@ -29003,7 +29715,7 @@ interface IgDatePicker { * 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; + nullValue?: string|number|Date; /** * This option is inherited from a parent widget and it's not applicable for igDateEditor @@ -29291,19 +30003,21 @@ interface IgDatePickerMethods { /** * Gets/Sets editor value. * - * Note! This option doesn't use the displayInputFormat to extract the date + * Note! This option doesn't use the dateInputFormat 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. + * Gets selected date as a date object. This method can be used when dataMode is set as either displayModeText or editModeText. + * In such cases the value() method will not return date object and getSelectedDate() can be used to replace that functionality. */ getSelectedDate(): Object; /** - * Sets selected date. + * Sets selected date. This method can be used when dataMode is set as either displayModeText or editModeText. + * In such cases the value() cannot accept a date object as a new value and getSelectedDate() can be used to replace that functionality. * * @param date */ @@ -29573,10 +30287,10 @@ interface IgCheckboxEditorMethods { /** * 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"); + * 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 */ @@ -30149,14 +30863,14 @@ interface JQuery { /** * 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. + * Items in the list can be of type string. * */ 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. + * Items in the list can be of type string. * * * @optionValue New value to be set. @@ -30342,13 +31056,13 @@ interface JQuery { 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. + * Gets/Sets the ability of the editor to automatically move the dropdown list selection item from one end to the opposite side. When the last item is reached and spin down is performed, the first item gets selected 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. + * /Sets the ability of the editor to automatically move the dropdown list selection item from one end to the opposite side. When the last item is reached and spin down is performed, the first item gets selected and vice versa. This option has no effect there is no drop-down list. * * * @optionValue New value to be set. @@ -30356,13 +31070,13 @@ interface JQuery { 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 + * Gets/Sets if the editor should only allow values from the list of items. Matching is case-insensitive. * */ 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 + * /Sets if the editor should only allow values from the list of items. Matching is case-insensitive. * * * @optionValue New value to be set. @@ -31117,14 +31831,14 @@ interface JQuery { /** * 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. + * Items in the list can be of type number. * */ 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. + * Items in the list can be of type number. * * * @optionValue New value to be set. @@ -31149,6 +31863,7 @@ interface JQuery { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * */ igNumericEditor(optionLiteral: 'option', optionName: "negativeSign"): string; @@ -31157,6 +31872,7 @@ interface JQuery { * /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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * * * @optionValue New value to be set. @@ -31185,6 +31901,7 @@ interface JQuery { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ igNumericEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; @@ -31193,6 +31910,7 @@ interface JQuery { * /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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * * * @optionValue New value to be set. @@ -31202,8 +31920,9 @@ interface JQuery { /** * 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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ igNumericEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; @@ -31211,8 +31930,9 @@ interface JQuery { /** * /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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * * * @optionValue New value to be set. @@ -31225,7 +31945,8 @@ interface JQuery { * 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: The numbers in the array must be positive integers. + * 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. * */ @@ -31237,7 +31958,8 @@ interface JQuery { * 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: The numbers in the array must be positive integers. + * 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. * * @@ -31246,19 +31968,21 @@ interface JQuery { igNumericEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; /** - * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Gets/Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ igNumericEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; /** - * /Sets the maximum number of decimal places which are used in display mode(no focus). + * /Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * * * @optionValue New value to be set. @@ -31266,29 +31990,47 @@ interface JQuery { igNumericEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; /** - * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * Gets/Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ igNumericEditor(optionLiteral: 'option', optionName: "minDecimals"): number; /** - * /Sets the minimum number of decimal places which are used in display (no focus) state. + * /Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; + /** + * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "roundDecimals"): boolean; + + /** + * /Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "roundDecimals", optionValue: boolean): void; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -31382,7 +32124,7 @@ interface JQuery { igNumericEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; /** - * Gets/Sets support for scientific format in edit mode. + * Gets/Sets support for scientific format. * 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. * @@ -31391,7 +32133,7 @@ interface JQuery { igNumericEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; /** - * /Sets support for scientific format in edit mode. + * /Sets support for scientific format. * 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. * @@ -31403,18 +32145,34 @@ interface JQuery { /** * 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * */ 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * * @optionValue New value to be set. */ igNumericEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + /** + * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + /** * Removed from numeric editor options */ @@ -31625,20 +32383,6 @@ interface JQuery { */ 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. * @@ -32041,14 +32785,14 @@ interface JQuery { /** * 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. + * Items in the list can be of type number. * */ 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. + * Items in the list can be of type number. * * * @optionValue New value to be set. @@ -32073,6 +32817,7 @@ interface JQuery { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * */ igCurrencyEditor(optionLiteral: 'option', optionName: "negativeSign"): string; @@ -32081,6 +32826,7 @@ interface JQuery { * /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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * * * @optionValue New value to be set. @@ -32109,6 +32855,7 @@ interface JQuery { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ igCurrencyEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; @@ -32117,6 +32864,7 @@ interface JQuery { * /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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * * * @optionValue New value to be set. @@ -32126,8 +32874,9 @@ interface JQuery { /** * 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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ igCurrencyEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; @@ -32135,8 +32884,9 @@ interface JQuery { /** * /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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * * * @optionValue New value to be set. @@ -32149,7 +32899,8 @@ interface JQuery { * 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: The numbers in the array must be positive integers. + * 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. * */ @@ -32161,7 +32912,8 @@ interface JQuery { * 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: The numbers in the array must be positive integers. + * 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. * * @@ -32170,19 +32922,21 @@ interface JQuery { igCurrencyEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; /** - * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Gets/Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ igCurrencyEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; /** - * /Sets the maximum number of decimal places which are used in display mode(no focus). + * /Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * * * @optionValue New value to be set. @@ -32190,29 +32944,47 @@ interface JQuery { igCurrencyEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; /** - * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * Gets/Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ igCurrencyEditor(optionLiteral: 'option', optionName: "minDecimals"): number; /** - * /Sets the minimum number of decimal places which are used in display (no focus) state. + * /Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; + /** + * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "roundDecimals"): boolean; + + /** + * /Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "roundDecimals", optionValue: boolean): void; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -32306,7 +33078,7 @@ interface JQuery { igCurrencyEditor(optionLiteral: 'option', optionName: "spinDelta", optionValue: number): void; /** - * Gets/Sets support for scientific format in edit mode. + * Gets/Sets support for scientific format. * 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. * @@ -32315,7 +33087,7 @@ interface JQuery { igCurrencyEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; /** - * /Sets support for scientific format in edit mode. + * /Sets support for scientific format. * 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. * @@ -32327,18 +33099,34 @@ interface JQuery { /** * 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * */ 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * * @optionValue New value to be set. */ igCurrencyEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + /** + * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + /** * Removed from numeric editor options */ @@ -32549,20 +33337,6 @@ interface JQuery { */ 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. * @@ -32878,14 +33652,14 @@ interface JQuery { /** * 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. + * Items in the list can be of type number. * */ 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. + * Items in the list can be of type number. * * * @optionValue New value to be set. @@ -32910,6 +33684,7 @@ interface JQuery { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * */ igPercentEditor(optionLiteral: 'option', optionName: "negativeSign"): string; @@ -32918,6 +33693,7 @@ interface JQuery { * /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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) options. * * * @optionValue New value to be set. @@ -32946,6 +33722,7 @@ interface JQuery { * 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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ igPercentEditor(optionLiteral: 'option', optionName: "decimalSeparator"): string; @@ -32954,6 +33731,7 @@ interface JQuery { * /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. + * Note: This option's value should not be equal to the value of [groupSeparator](ui.igNumericEditor#options:groupSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * * * @optionValue New value to be set. @@ -32963,8 +33741,9 @@ interface JQuery { /** * 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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * */ igPercentEditor(optionLiteral: 'option', optionName: "groupSeparator"): string; @@ -32972,8 +33751,9 @@ interface JQuery { /** * /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: 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. + * Note: This option's value should not be equal to the value of [decimalSeparator](ui.igNumericEditor#options:decimalSeparator) or [negativeSign](ui.igNumericEditor#options:negativeSign) options. * * * @optionValue New value to be set. @@ -32986,7 +33766,8 @@ interface JQuery { * 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: The numbers in the array must be positive integers. + * 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. * */ @@ -32998,7 +33779,8 @@ interface JQuery { * 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: The numbers in the array must be positive integers. + * 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. * * @@ -33007,19 +33789,21 @@ interface JQuery { igPercentEditor(optionLiteral: 'option', optionName: "groups", optionValue: any[]): void; /** - * Gets/Sets the maximum number of decimal places which are used in display mode(no focus). + * Gets/Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ igPercentEditor(optionLiteral: 'option', optionName: "maxDecimals"): number; /** - * /Sets the maximum number of decimal places which are used in display mode(no focus). + * /Sets the maximum number of decimal places supported by the editor. * 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 between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * * * @optionValue New value to be set. @@ -33027,29 +33811,47 @@ interface JQuery { igPercentEditor(optionLiteral: 'option', optionName: "maxDecimals", optionValue: number): void; /** - * Gets/Sets the minimum number of decimal places which are used in display (no focus) state. + * Gets/Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * */ igPercentEditor(optionLiteral: 'option', optionName: "minDecimals"): number; /** - * /Sets the minimum number of decimal places which are used in display (no focus) state. + * /Sets the minimum number of decimal places supported by the editor. * 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. + * Note: This option supports values between 0 and 15, when dataMode is 'double' (default) and values between 0 and 7 in 'float' mode. * * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "minDecimals", optionValue: number): void; + /** + * Gets/Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "roundDecimals"): boolean; + + /** + * /Sets whether the last decimal place will be rounded, when the maxDecimal option is defined and applied. + * For example if the initial editor value is set to 123.4567, maxDecimals option is set to 3 and roundDecimals is enabled, + * then editor will round the value and will display it as 123.457. If roundDecimals is disabled then editor value will be truncated to 123.456. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "roundDecimals", optionValue: boolean): void; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -33109,7 +33911,7 @@ interface JQuery { igPercentEditor(optionLiteral: 'option', optionName: "allowNullValue", optionValue: boolean): void; /** - * Gets/Sets support for scientific format in edit mode. + * Gets/Sets support for scientific format. * 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. * @@ -33118,7 +33920,7 @@ interface JQuery { igPercentEditor(optionLiteral: 'option', optionName: "scientificFormat"): string; /** - * /Sets support for scientific format in edit mode. + * /Sets support for scientific format. * 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. * @@ -33130,18 +33932,34 @@ interface JQuery { /** * 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * */ 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. + * This applies to [minValue](ui.%%WidgetNameLowered%%#options:minValue) and [maxValue](ui.%%WidgetNameLowered%%#options:maxValue) or cycling through list items if [isLimitedToListValues](ui.%%WidgetNameLowered%%#options:isLimitedToListValues) is enabled. * * * @optionValue New value to be set. */ igPercentEditor(optionLiteral: 'option', optionName: "spinWrapAround", optionValue: boolean): void; + /** + * Gets/Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "isLimitedToListValues"): boolean; + + /** + * /Sets if the editor should only allow values from the list of items. Enabling this also causes spin actions to cycle through list items instead. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "isLimitedToListValues", optionValue: boolean): void; + /** * Removed from numeric editor options */ @@ -33352,20 +34170,6 @@ interface JQuery { */ 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. * @@ -33615,14 +34419,12 @@ interface JQuery { /** * 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. */ @@ -33675,13 +34477,13 @@ interface JQuery { 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. + * It affects the value of the control (value method/option and submitted in forms). It defines what the value should contain from text, unfilled prompts and literals. The default is allText and when used value method/option returns the text entered, all prompts (positions) and literals. * */ 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. + * It affects the value of the control (value method/option and submitted in forms). It defines what the value should contain from text, unfilled prompts and literals. The default is allText and when used value method/option returns the text entered, all prompts (positions) and literals. * * * @optionValue New value to be set. @@ -33703,13 +34505,13 @@ interface JQuery { 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. + * Gets/Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). * */ 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. + * /Sets character which is used as replacement of not-filled required position in mask when editor is in display mode (not focused). * * * @optionValue New value to be set. @@ -34289,14 +35091,14 @@ interface JQuery { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * * * @optionValue New value to be set. @@ -34305,14 +35107,14 @@ interface JQuery { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * * * @optionValue New value to be set. @@ -34321,14 +35123,14 @@ interface JQuery { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * * * @optionValue New value to be set. @@ -34486,21 +35288,43 @@ interface JQuery { 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. + * Gets the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" * */ 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. + * The value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" * * * @optionValue New value to be set. */ igDateEditor(optionLiteral: 'option', optionName: "dataMode", optionValue: string): void; + /** + * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. + * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. + * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * + */ + igDateEditor(optionLiteral: 'option', optionName: "displayTimeOffset"): any; + + /** + * /Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. + * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. + * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * + * + * @optionValue New value to be set. + */ + igDateEditor(optionLiteral: 'option', optionName: "displayTimeOffset", optionValue: any): void; + /** * Gets visibility of the spin and clear buttons. That option can be set only on initialization. Combinations like 'spin,clear' are supported too. * @@ -34516,13 +35340,19 @@ interface JQuery { 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. + * Gets/Sets delta-value which is used to increment or decrement the editor date on spin actions. + * When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * The value can be only a positive integer number, otherwise it will be set as 1, or in the cases with double or float the the whole part will be taken. * */ 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. + * /Sets delta-value which is used to increment or decrement the editor date on spin actions. + * When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * The value can be only a positive integer number, otherwise it will be set as 1, or in the cases with double or float the the whole part will be taken. * * * @optionValue New value to be set. @@ -34548,27 +35378,15 @@ interface JQuery { 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. + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * */ 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. + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * * * @optionValue New value to be set. @@ -34611,7 +35429,7 @@ interface JQuery { * 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; + igDateEditor(optionLiteral: 'option', optionName: "nullValue"): string|number|Date; /** * /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 @@ -34619,7 +35437,7 @@ interface JQuery { * * @optionValue New value to be set. */ - igDateEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + igDateEditor(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number|Date): void; /** * This option is inherited from a parent widget and it's not applicable for igDateEditor @@ -35326,14 +36144,14 @@ interface JQuery { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * * * @optionValue New value to be set. @@ -35342,14 +36160,14 @@ interface JQuery { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * * * @optionValue New value to be set. @@ -35358,14 +36176,14 @@ interface JQuery { /** * 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. + * Note! This option doesn't use the dateInputFormat 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. + * Note! This option doesn't use the dateInputFormat to extract the date. * * * @optionValue New value to be set. @@ -35523,15 +36341,19 @@ interface JQuery { 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. + * Gets the value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" * */ 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. + * The value type returned by the get of value() method and option. Also affects how the value is stored for form submit. + * The [enableUTCDates](ui.%%WidgetNameLowered%%#options:enableUTCDates) option can be used to output an UTC ISO string instead. + * For example 10:00 AM from a client with local offset of 5 hours ahead of GMT will be serialized as: + * "2016-11-11T10:00:00+05:00" * * * @optionValue New value to be set. @@ -35539,13 +36361,37 @@ interface JQuery { 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. + * Gets/Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. + * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. + * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "displayTimeOffset"): any; + + /** + * /Sets time zone offset from UTC, in minutes. The client date values are displayed with this offset instead of the local one. + * Note: It is recommended that this option is used with an UTC value (e.g. "2016-11-03T14:08:08.504Z") so the outcome is consistent. + * Values with ambiguous time zone could map to unpredictable times depending on the user agent local zone. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "displayTimeOffset", optionValue: any): void; + + /** + * Gets/Sets delta-value which is used to increment or decrement the editor date on spin actions. + * When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * The value can be only a positive integer number, otherwise it will be set as 1, or in the cases with double or float the the whole part will be taken. * */ 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. + * /Sets delta-value which is used to increment or decrement the editor date on spin actions. + * When not editing (focused) the delta is applied on the day if available in the input mask or the lowest available period. + * When in edit mode the time period, where the cursor is positioned, is incremented or decremented with the defined delta value. + * The value can be only a positive integer number, otherwise it will be set as 1, or in the cases with double or float the the whole part will be taken. * * * @optionValue New value to be set. @@ -35571,27 +36417,15 @@ interface JQuery { 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. + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * */ 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. + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * The option is only applied in "date" [dataMode](ui.%%WidgetNameLowered%%#options:dataMode). * * * @optionValue New value to be set. @@ -35634,7 +36468,7 @@ interface JQuery { * 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; + igDatePicker(optionLiteral: 'option', optionName: "nullValue"): string|number|Date; /** * /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 @@ -35642,7 +36476,7 @@ interface JQuery { * * @optionValue New value to be set. */ - igDatePicker(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number): void; + igDatePicker(optionLiteral: 'option', optionName: "nullValue", optionValue: string|number|Date): void; /** * This option is inherited from a parent widget and it's not applicable for igDateEditor @@ -36718,15 +37552,13 @@ interface IgFunnelChart { valueMemberPath?: string; /** - * Gets or sets the Brushes property. - * The brushes property defines the palette from which automatically assigned brushes are selected. + * Gets or sets the palette of brushes to use for coloring the slices. * 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. + * Gets or sets the palette of brushes to use for outlines on the slices. * 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; @@ -36750,8 +37582,8 @@ interface IgFunnelChart { * Gets or sets whether the inner labels are visible. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ innerLabelVisibility?: string; @@ -36759,8 +37591,8 @@ interface IgFunnelChart { * Gets or sets whether the outer labels are visible. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ outerLabelVisibility?: string; @@ -36873,6 +37705,12 @@ interface IgFunnelChart { * Gets or sets the thickness of outline around slices. */ outlineThickness?: number; + + /** + * Gets or sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. + */ pixelScalingRatio?: number; outerLabelTextColor?: any; textColor?: any; @@ -37079,7 +37917,7 @@ interface IgFunnelChartMethods { /** * 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. + * 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. */ @@ -37087,7 +37925,7 @@ interface IgFunnelChartMethods { /** * 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. + * 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. @@ -37097,7 +37935,7 @@ interface IgFunnelChartMethods { /** * 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. + * 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. @@ -37114,6 +37952,11 @@ interface IgFunnelChartMethods { * Binds data to the chart */ dataBind(): void; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; } interface JQuery { data(propertyName: "igFunnelChart"): IgFunnelChartMethods; @@ -37139,6 +37982,7 @@ interface JQuery { igFunnelChart(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; igFunnelChart(methodName: "chart"): Object; igFunnelChart(methodName: "dataBind"): void; + igFunnelChart(methodName: "flush"): void; /** * Gets values for upper and lower bezier points. That option has effect only when useBezierCurve is enabled. @@ -37205,15 +38049,13 @@ interface JQuery { 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. + * Gets the palette of brushes to use for coloring the slices. * 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. + * Sets the palette of brushes to use for coloring the slices. * 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. @@ -37221,15 +38063,13 @@ interface JQuery { 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. + * Gets the palette of brushes to use for outlines on the slices. * 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. + * Sets the palette of brushes to use for outlines on the slices. * 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. @@ -37533,10 +38373,18 @@ interface JQuery { igFunnelChart(optionLiteral: 'option', optionName: "outlineThickness", optionValue: number): void; /** + * Gets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ igFunnelChart(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; /** + * Sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. + * + * @optionValue New value to be set. */ igFunnelChart(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; @@ -37787,6 +38635,1955 @@ interface JQuery { igFunnelChart(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igFunnelChart(methodName: string, ...methodParams: any[]): any; } +interface RowsRequestingEvent { + (event: Event, ui: RowsRequestingEventUIParam): void; +} + +interface RowsRequestingEventUIParam { +} + +interface RowsRequestedEvent { + (event: Event, ui: RowsRequestedEventUIParam): void; +} + +interface RowsRequestedEventUIParam { +} + +interface IgGridAppendRowsOnDemand { + /** + * Defines local or remote type of appending rows on demand in igGrid + * + * + * Valid values: + * "remote" request data from the remote endpoint + * "local" loading data on the client-side + */ + type?: string; + + /** + * Default number of records per chunk + * + */ + chunkSize?: number; + + /** + * The property in the response 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 chunk size + * + */ + chunkSizeUrlKey?: string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk index + * + */ + chunkIndexUrlKey?: string; + + /** + * Initial chunk index position + * + */ + defaultChunkIndex?: number; + + /** + * Current chunk index position + * + */ + currentChunkIndex?: number; + + /** + * denotes the append rows on demand request method + * + * + * Valid values: + * "auto" new record will be appended to the grid while the user scrolls the scrollbar + * "button" a button will be rendered at the bottom of the grid. The user should press it to load more rows + */ + loadTrigger?: string; + + /** + * Specifies caption text for the "load more data" button. + * + */ + loadMoreDataButtonText?: string; + + /** + * Event fired before the rows are requested from the remote endpoint. + * Return false in order to cancel requesting of rows. + */ + rowsRequesting?: RowsRequestingEvent; + + /** + * Event fired after the requested rows are returned from the remote endpoint, but before grid data rebinds + */ + rowsRequested?: RowsRequestedEvent; + + /** + * Option for igGridAppendRowsOnDemand + */ + [optionName: string]: any; +} +interface IgGridAppendRowsOnDemandMethods { + /** + * Destroys the append rows on demand widget + */ + destroy(): void; + + /** + * Loads the next chunk of data. + */ + nextChunk(): void; +} +interface JQuery { + data(propertyName: "igGridAppendRowsOnDemand"): IgGridAppendRowsOnDemandMethods; +} + +interface JQuery { + igGridAppendRowsOnDemand(methodName: "destroy"): void; + igGridAppendRowsOnDemand(methodName: "nextChunk"): void; + + /** + * Defines local or remote type of appending rows on demand in igGrid + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "type"): string; + + /** + * Defines local or remote type of appending rows on demand in igGrid + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * Default number of records per chunk + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSize"): number; + + /** + * Default number of records per chunk + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSize", optionValue: number): void; + + /** + * The property in the response that will hold the total number of records in the data source + * + */ + igGridAppendRowsOnDemand(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. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "recordCountKey", optionValue: string): void; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk size + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSizeUrlKey"): string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk size + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkSizeUrlKey", optionValue: string): void; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk index + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkIndexUrlKey"): string; + + /** + * Denotes the name of the encoded URL parameter that will state what is the currently requested chunk index + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "chunkIndexUrlKey", optionValue: string): void; + + /** + * Initial chunk index position + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "defaultChunkIndex"): number; + + /** + * Initial chunk index position + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "defaultChunkIndex", optionValue: number): void; + + /** + * Current chunk index position + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "currentChunkIndex"): number; + + /** + * Current chunk index position + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "currentChunkIndex", optionValue: number): void; + + /** + * Denotes the append rows on demand request method + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "loadTrigger"): string; + + /** + * Denotes the append rows on demand request method + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "loadTrigger", optionValue: string): void; + + /** + * Gets caption text for the "load more data" button. + * + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "loadMoreDataButtonText"): string; + + /** + * Sets caption text for the "load more data" button. + * + * + * @optionValue New value to be set. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "loadMoreDataButtonText", optionValue: string): void; + + /** + * Event fired before the rows are requested from the remote endpoint. + * Return false in order to cancel requesting of rows. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "rowsRequesting"): RowsRequestingEvent; + + /** + * Event fired before the rows are requested from the remote endpoint. + * Return false in order to cancel requesting of rows. + * + * @optionValue Define event handler function. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "rowsRequesting", optionValue: RowsRequestingEvent): void; + + /** + * Event fired after the requested rows are returned from the remote endpoint, but before grid data rebinds + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "rowsRequested"): RowsRequestedEvent; + + /** + * Event fired after the requested rows are returned from the remote endpoint, but before grid data rebinds + * + * @optionValue Define event handler function. + */ + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: "rowsRequested", optionValue: RowsRequestedEvent): void; + igGridAppendRowsOnDemand(options: IgGridAppendRowsOnDemand): JQuery; + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: string): any; + igGridAppendRowsOnDemand(optionLiteral: 'option', options: IgGridAppendRowsOnDemand): JQuery; + igGridAppendRowsOnDemand(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridAppendRowsOnDemand(methodName: string, ...methodParams: any[]): any; +} +interface CellsMergingEvent { + (event: Event, ui: CellsMergingEventUIParam): void; +} + +interface CellsMergingEventUIParam { +} + +interface CellsMergedEvent { + (event: Event, ui: CellsMergedEventUIParam): void; +} + +interface CellsMergedEventUIParam { +} + +interface IgGridCellMerging { + /** + * controls the initial state + * + * + * Valid values: + * "regular" the grid won't be initialized with cells merged + * "merged" the grid will be initialized with cells merged + */ + initialState?: string; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + inherit?: boolean; + + /** + * Event fired before a new merged cells group is created. + */ + cellsMerging?: CellsMergingEvent; + cellsMerged?: CellsMergedEvent; + + /** + * Option for igGridCellMerging + */ + [optionName: string]: any; +} +interface IgGridCellMergingMethods { + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridCellMerging"): IgGridCellMergingMethods; +} + +interface JQuery { + igGridCellMerging(methodName: "destroy"): void; + + /** + * Controls the initial state + * + */ + igGridCellMerging(optionLiteral: 'option', optionName: "initialState"): string; + + /** + * Controls the initial state + * + * + * @optionValue New value to be set. + */ + igGridCellMerging(optionLiteral: 'option', optionName: "initialState", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridCellMerging(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. + */ + igGridCellMerging(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a new merged cells group is created. + */ + igGridCellMerging(optionLiteral: 'option', optionName: "cellsMerging"): CellsMergingEvent; + + /** + * Event fired before a new merged cells group is created. + * + * @optionValue Define event handler function. + */ + igGridCellMerging(optionLiteral: 'option', optionName: "cellsMerging", optionValue: CellsMergingEvent): void; + + /** + */ + igGridCellMerging(optionLiteral: 'option', optionName: "cellsMerged"): CellsMergedEvent; + + /** + */ + igGridCellMerging(optionLiteral: 'option', optionName: "cellsMerged", optionValue: CellsMergedEvent): void; + igGridCellMerging(options: IgGridCellMerging): JQuery; + igGridCellMerging(optionLiteral: 'option', optionName: string): any; + igGridCellMerging(optionLiteral: 'option', options: IgGridCellMerging): JQuery; + igGridCellMerging(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridCellMerging(methodName: string, ...methodParams: any[]): any; +} +interface IgGridColumnFixingColumnSetting { + /** + * 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; + + /** + * Specifies whether the column can be fixed or not. If allow fixing is false, then the fixing pin will not be rendered for the column. + * + */ + allowFixing?: boolean; + + /** + * Specifies whether the column is initially fixed or not. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#initial-state) out for more information. + * + */ + isFixed?: boolean; + + /** + * Option for IgGridColumnFixingColumnSetting + */ + [optionName: string]: any; +} + +interface ColumnFixingEvent { + (event: Event, ui: ColumnFixingEventUIParam): void; +} + +interface ColumnFixingEventUIParam { +} + +interface ColumnFixedEvent { + (event: Event, ui: ColumnFixedEventUIParam): void; +} + +interface ColumnFixedEventUIParam { +} + +interface ColumnUnfixingEvent { + (event: Event, ui: ColumnUnfixingEventUIParam): void; +} + +interface ColumnUnfixingEventUIParam { +} + +interface ColumnUnfixedEvent { + (event: Event, ui: ColumnUnfixedEventUIParam): void; +} + +interface ColumnUnfixedEventUIParam { +} + +interface ColumnFixingRefusedEvent { + (event: Event, ui: ColumnFixingRefusedEventUIParam): void; +} + +interface ColumnFixingRefusedEventUIParam { +} + +interface ColumnUnfixingRefusedEvent { + (event: Event, ui: ColumnUnfixingRefusedEventUIParam): void; +} + +interface ColumnUnfixingRefusedEventUIParam { +} + +interface IgGridColumnFixing { + /** + * Specifies the tooltip text on the column fixing header icon when column is not fixed. + * + */ + headerFixButtonText?: string; + + /** + * Specifies the tooltip text on the column fixing header icon when column is fixed. + * + */ + headerUnfixButtonText?: string; + + /** + * Specifies whether to show the column fixing buttons in header cells/feature chooser. + * + */ + showFixButtons?: boolean; + + /** + * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * + */ + syncRowHeights?: boolean; + + /** + * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * + */ + scrollDelta?: number; + + /** + * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * + * + * Valid values: + * "left" Fixed columns are rendered on the left side of the main grid. + * "right" Fixed columns are rendered on the right side of the main grid. + */ + fixingDirection?: string; + + /** + * List of column settings that specifies custom column fixing options on a per column basis. + * + */ + columnSettings?: IgGridColumnFixingColumnSetting[]; + + /** + * Text of the feature chooser button for fixing a currently unfixed column. + * + */ + featureChooserTextFixedColumn?: string; + + /** + * Text of the feature chooser button for unfixing a currently fixed column. + * + */ + featureChooserTextUnfixedColumn?: string; + + /** + * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * + * + * Valid values: + * "string" The width can be set in pixels (px) and percentage (%). + * "number" The width can be set in pixels as a number. + */ + minimalVisibleAreaWidth?: string|number; + + /** + * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * + */ + fixNondataColumns?: boolean; + + /** + * When true all the TR DOM attributes of the unfixed row will be copied to the fixed row. Note that when enabled this option negatively affects performance when fixing a column. + */ + populateDataRowsAttributes?: boolean; + + /** + * Event which is fired when column fixing operation is initiated. + */ + columnFixing?: ColumnFixingEvent; + + /** + * Event which is fired when column fixing operation is finished + */ + columnFixed?: ColumnFixedEvent; + + /** + * Event which is fired when column unfixing operation is initiated + */ + columnUnfixing?: ColumnUnfixingEvent; + + /** + * Event which is fired when column unfixing operation is done + */ + columnUnfixed?: ColumnUnfixedEvent; + + /** + * Event which is fired when column fixing operation has failed - e.g. sum of the width of the fixed columns container and width of the column to be fixed exceeds the grid width + */ + columnFixingRefused?: ColumnFixingRefusedEvent; + + /** + * Event which is fired when column unfixing operation has failed - e.g.: there is only one fixed visible column(and tries to unfix it) and at least one fixed hidden column + */ + columnUnfixingRefused?: ColumnUnfixingRefusedEvent; + + /** + * Option for igGridColumnFixing + */ + [optionName: string]: any; +} +interface IgGridColumnFixingMethods { + /** + * Unfixes a column by specified column identifier - column key or column index. + * + * @param colIdentifier An identifier of the column to be unfixed - column index or column key. + * @param target Key of the column where the unfixed column should move to. + * @param after Specifies where the unfixed column should be rendered after or before the target column. This parameter is disregarded if there is no target column specified. + */ + unfixColumn(colIdentifier: Object, target?: string, after?: boolean): Object; + + /** + * Checks whether the heights of fixed and unfixed tables are equal - if not sync them. Similar check is made for heights of table rows. + */ + checkAndSyncHeights(): void; + + /** + * If the 'check' argument is set to true, checks whether the heights of fixed and unfixed tables are equal, if not sync them. Similar check is made for heights of table rows. If the clearRowsHeights argument is set to true, clears rows heights before syncing them. + * + * @param check If set to true, checks whether the heights of fixed and unfixed tables are equal, if not sync them. If this argument is set to false sync is performed regardless of the current heights. + * @param clearRowsHeights Clears row heigths for all visible rows. + */ + syncHeights(check?: boolean, clearRowsHeights?: boolean): void; + + /** + * Returns whether the column with the specified key is a column group header, when the [multi-column headers](http://www.igniteui.com/help/iggrid-multicolumnheaders-landingpage) feature is used. + * + * @param colKey The key of the column to perform the check for. + */ + isGroupHeader(colKey: string): boolean; + + /** + * Checks whether column fixing is allowed for the specified columns. It should not be allowed if there is only one visible column in the unfixed area. + * + * @param columns Array of columns and/or column identifiers - could be column indexes, column keys, column object or mixed. + */ + checkFixingAllowed(columns: any[]): boolean; + + /** + * Checks whether unfixing is allowed for the specified columns. It should not be allowed if there is only one visible column in the fixed area. + * + * @param columns Array of columns and/or column identifiers - could be column indexes, column keys, column object or mixed. + */ + checkUnfixingAllowed(columns: any[]): boolean; + + /** + * Fixes a column by specified column identifier - column index or column key. + * + * @param colIdentifier An identifier of the column to be fixed - column index or column key. + * @param target Key of the column where the fixed column should move to. + * @param after Specifies where the fixed column should be moved after or before the target column. This parameter is disregarded if there is no target column specified. + */ + fixColumn(colIdentifier: Object, target?: string, after?: boolean): Object; + + /** + * Fixes non-data columns (such as the row numbering column of row selectors) if any and if [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is left. Does nothing if the non-data columns are already fixed. + */ + fixNonDataColumns(): void; + + /** + * This function is deprecated - use function fixNonDataColumns. + */ + fixDataSkippedColumns(): void; + + /** + * Unfixes non-data columns (such as the row numbering column of row selectors) if any and if [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is left. Does nothing if the non-data columns are already fixed. + */ + unfixNonDataColumns(): void; + + /** + * This function is deprecated - use function unfixNonDataColumns. + */ + unfixDataSkippedColumns(): void; + + /** + * Unfixes all fixed columns. + */ + unfixAllColumns(): void; + + /** + * Syncs rows heights between two collections of rows. + * + * @param $trs An array of rows of the first(fixed/unfixed) container. + * @param $anotherRows An array of rows of the second(fixed/unfixed) container. + */ + syncRowsHeights($trs: any[], $anotherRows: any[]): void; + + /** + * Calculates widths of the fixed columns. + * + * @param fCols Array of grid columns. If not set then the total width of the fixed columns are returned. + * @param excludeNonDataColumns If set to true do not calculate the width of non-data fixed columns (like the row selector row numbering column). + * @param includeHidden If set to true calculates width of the hidden fixed columns (their initial width before hiding). + */ + getWidthOfFixedColumns(fCols?: any[], excludeNonDataColumns?: boolean, includeHidden?: boolean): number; + + /** + * Destroys the column fixing widget + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igGridColumnFixing"): IgGridColumnFixingMethods; +} + +interface JQuery { + igGridColumnFixing(methodName: "unfixColumn", colIdentifier: Object, target?: string, after?: boolean): Object; + igGridColumnFixing(methodName: "checkAndSyncHeights"): void; + igGridColumnFixing(methodName: "syncHeights", check?: boolean, clearRowsHeights?: boolean): void; + igGridColumnFixing(methodName: "isGroupHeader", colKey: string): boolean; + igGridColumnFixing(methodName: "checkFixingAllowed", columns: any[]): boolean; + igGridColumnFixing(methodName: "checkUnfixingAllowed", columns: any[]): boolean; + igGridColumnFixing(methodName: "fixColumn", colIdentifier: Object, target?: string, after?: boolean): Object; + igGridColumnFixing(methodName: "fixNonDataColumns"): void; + igGridColumnFixing(methodName: "fixDataSkippedColumns"): void; + igGridColumnFixing(methodName: "unfixNonDataColumns"): void; + igGridColumnFixing(methodName: "unfixDataSkippedColumns"): void; + igGridColumnFixing(methodName: "unfixAllColumns"): void; + igGridColumnFixing(methodName: "syncRowsHeights", $trs: any[], $anotherRows: any[]): void; + igGridColumnFixing(methodName: "getWidthOfFixedColumns", fCols?: any[], excludeNonDataColumns?: boolean, includeHidden?: boolean): number; + igGridColumnFixing(methodName: "destroy"): void; + + /** + * Gets the tooltip text on the column fixing header icon when column is not fixed. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "headerFixButtonText"): string; + + /** + * Sets the tooltip text on the column fixing header icon when column is not fixed. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "headerFixButtonText", optionValue: string): void; + + /** + * Gets the tooltip text on the column fixing header icon when column is fixed. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "headerUnfixButtonText"): string; + + /** + * Sets the tooltip text on the column fixing header icon when column is fixed. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "headerUnfixButtonText", optionValue: string): void; + + /** + * Gets whether to show the column fixing buttons in header cells/feature chooser. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons"): boolean; + + /** + * Sets whether to show the column fixing buttons in header cells/feature chooser. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons", optionValue: boolean): void; + + /** + * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights"): boolean; + + /** + * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights", optionValue: boolean): void; + + /** + * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta"): number; + + /** + * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; + + /** + * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "fixingDirection"): string; + + /** + * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "fixingDirection", optionValue: string): void; + + /** + * List of column settings that specifies custom column fixing options on a per column basis. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnFixingColumnSetting[]; + + /** + * List of column settings that specifies custom column fixing options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnFixingColumnSetting[]): void; + + /** + * Text of the feature chooser button for fixing a currently unfixed column. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextFixedColumn"): string; + + /** + * Text of the feature chooser button for fixing a currently unfixed column. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextFixedColumn", optionValue: string): void; + + /** + * Text of the feature chooser button for unfixing a currently fixed column. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextUnfixedColumn"): string; + + /** + * Text of the feature chooser button for unfixing a currently fixed column. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextUnfixedColumn", optionValue: string): void; + + /** + * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "minimalVisibleAreaWidth"): string|number; + + /** + * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "minimalVisibleAreaWidth", optionValue: string|number): void; + + /** + * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns"): boolean; + + /** + * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns", optionValue: boolean): void; + + /** + * When true all the TR DOM attributes of the unfixed row will be copied to the fixed row. Note that when enabled this option negatively affects performance when fixing a column. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "populateDataRowsAttributes"): boolean; + + /** + * When true all the TR DOM attributes of the unfixed row will be copied to the fixed row. Note that when enabled this option negatively affects performance when fixing a column. + * + * @optionValue New value to be set. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "populateDataRowsAttributes", optionValue: boolean): void; + + /** + * Event which is fired when column fixing operation is initiated. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnFixing"): ColumnFixingEvent; + + /** + * Event which is fired when column fixing operation is initiated. + * + * @optionValue Define event handler function. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnFixing", optionValue: ColumnFixingEvent): void; + + /** + * Event which is fired when column fixing operation is finished + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnFixed"): ColumnFixedEvent; + + /** + * Event which is fired when column fixing operation is finished + * + * @optionValue Define event handler function. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnFixed", optionValue: ColumnFixedEvent): void; + + /** + * Event which is fired when column unfixing operation is initiated + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixing"): ColumnUnfixingEvent; + + /** + * Event which is fired when column unfixing operation is initiated + * + * @optionValue Define event handler function. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixing", optionValue: ColumnUnfixingEvent): void; + + /** + * Event which is fired when column unfixing operation is done + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixed"): ColumnUnfixedEvent; + + /** + * Event which is fired when column unfixing operation is done + * + * @optionValue Define event handler function. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixed", optionValue: ColumnUnfixedEvent): void; + + /** + * Event which is fired when column fixing operation has failed - e.g. sum of the width of the fixed columns container and width of the column to be fixed exceeds the grid width + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnFixingRefused"): ColumnFixingRefusedEvent; + + /** + * Event which is fired when column fixing operation has failed - e.g. sum of the width of the fixed columns container and width of the column to be fixed exceeds the grid width + * + * @optionValue Define event handler function. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnFixingRefused", optionValue: ColumnFixingRefusedEvent): void; + + /** + * Event which is fired when column unfixing operation has failed - e.g.: there is only one fixed visible column(and tries to unfix it) and at least one fixed hidden column + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixingRefused"): ColumnUnfixingRefusedEvent; + + /** + * Event which is fired when column unfixing operation has failed - e.g.: there is only one fixed visible column(and tries to unfix it) and at least one fixed hidden column + * + * @optionValue Define event handler function. + */ + igGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixingRefused", optionValue: ColumnUnfixingRefusedEvent): void; + igGridColumnFixing(options: IgGridColumnFixing): JQuery; + igGridColumnFixing(optionLiteral: 'option', optionName: string): any; + igGridColumnFixing(optionLiteral: 'option', options: IgGridColumnFixing): JQuery; + igGridColumnFixing(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridColumnFixing(methodName: string, ...methodParams: any[]): any; +} +interface IgGridColumnMovingColumnSetting { + /** + * 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 moved. + * + */ + allowMoving?: boolean; + + /** + * Option for IgGridColumnMovingColumnSetting + */ + [optionName: string]: any; +} + +interface ColumnDragStartEvent { + (event: Event, ui: ColumnDragStartEventUIParam): void; +} + +interface ColumnDragStartEventUIParam { +} + +interface ColumnDragEndEvent { + (event: Event, ui: ColumnDragEndEventUIParam): void; +} + +interface ColumnDragEndEventUIParam { +} + +interface ColumnDragCanceledEvent { + (event: Event, ui: ColumnDragCanceledEventUIParam): void; +} + +interface ColumnDragCanceledEventUIParam { +} + +interface ColumnMovingEvent { + (event: Event, ui: ColumnMovingEventUIParam): void; +} + +interface ColumnMovingEventUIParam { +} + +interface ColumnMovedEvent { + (event: Event, ui: ColumnMovedEventUIParam): void; +} + +interface ColumnMovedEventUIParam { +} + +interface MovingDialogOpeningEvent { + (event: Event, ui: MovingDialogOpeningEventUIParam): void; +} + +interface MovingDialogOpeningEventUIParam { +} + +interface MovingDialogOpenedEvent { + (event: Event, ui: MovingDialogOpenedEventUIParam): void; +} + +interface MovingDialogOpenedEventUIParam { +} + +interface MovingDialogDraggedEvent { + (event: Event, ui: MovingDialogDraggedEventUIParam): void; +} + +interface MovingDialogDraggedEventUIParam { +} + +interface MovingDialogClosingEvent { + (event: Event, ui: MovingDialogClosingEventUIParam): void; +} + +interface MovingDialogClosingEventUIParam { +} + +interface MovingDialogClosedEvent { + (event: Event, ui: MovingDialogClosedEventUIParam): void; +} + +interface MovingDialogClosedEventUIParam { +} + +interface MovingDialogContentsRenderingEvent { + (event: Event, ui: MovingDialogContentsRenderingEventUIParam): void; +} + +interface MovingDialogContentsRenderingEventUIParam { +} + +interface MovingDialogContentsRenderedEvent { + (event: Event, ui: MovingDialogContentsRenderedEventUIParam): void; +} + +interface MovingDialogContentsRenderedEventUIParam { +} + +interface MovingDialogMoveUpButtonPressedEvent { + (event: Event, ui: MovingDialogMoveUpButtonPressedEventUIParam): void; +} + +interface MovingDialogMoveUpButtonPressedEventUIParam { +} + +interface MovingDialogMoveDownButtonPressedEvent { + (event: Event, ui: MovingDialogMoveDownButtonPressedEventUIParam): void; +} + +interface MovingDialogMoveDownButtonPressedEventUIParam { +} + +interface MovingDialogDragColumnMovingEvent { + (event: Event, ui: MovingDialogDragColumnMovingEventUIParam): void; +} + +interface MovingDialogDragColumnMovingEventUIParam { +} + +interface MovingDialogDragColumnMovedEvent { + (event: Event, ui: MovingDialogDragColumnMovedEventUIParam): void; +} + +interface MovingDialogDragColumnMovedEventUIParam { +} + +interface IgGridColumnMoving { + /** + * A list of column settings that specifies moving options on a per column basis. + * + */ + columnSettings?: IgGridColumnMovingColumnSetting[]; + + /** + * Specify the drag-and-drop mode for the feature + * + * + * Valid values: + * "immediate" Column headers will rearange as you drag with a space opening under the cursor for the header to be dropped on + * "deferred" A clone of the header dragged will be created and indicators will be shown between columns to help navigate the drop. + */ + mode?: string; + + /** + * Specify the way columns will be rearranged + * + * + * Valid values: + * "dom" Columns will be rearranged through dom manipulation + * "render" Columns will not be rearranged but the grid will be rendered again with the new column order. Please note this option is incompatible with immediate move mode. + */ + moveType?: string; + + /** + * Specifies if header cells should include an additional button that opens a moving helper dropdown. + * + */ + addMovingDropdown?: boolean; + + /** + * Specifies width of column moving dialog + * + */ + movingDialogWidth?: number; + + /** + * Specifies height of column moving dialog + * + */ + movingDialogHeight?: number; + + /** + * Specifies time in milliseconds for animation duration to show/hide modal dialog + * + */ + movingDialogAnimationDuration?: number; + + /** + * Specifies the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * + */ + movingAcceptanceTolerance?: number; + + /** + * Specifies the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * + */ + movingScrollTolerance?: number; + + /** + * Specifies a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * + */ + scrollSpeedMultiplier?: number; + + /** + * Specifies the length (in pixels) of each individual scroll operation + * + */ + scrollDelta?: number; + + /** + * Specifies whether the contents of the column being dragged will get hidden. The option is only + * relevant in immediate moving mode. + * + */ + hideHeaderContentsDuringDrag?: boolean; + + /** + * Specifies the opacity of the drag markup, while a column header is being dragged. + * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration + * will be used with priority over this one. + * + */ + dragHelperOpacity?: number; + + /** + * Specifies caption for each move down button in the column moving dialog + * + */ + movingDialogCaptionButtonDesc?: string; + + /** + * Specifies caption for each move up button in the column moving dialog + * + */ + movingDialogCaptionButtonAsc?: string; + + /** + * Specifies caption text for the column moving dialog + * + */ + movingDialogCaptionText?: string; + + /** + * Specifies caption text for the feature chooser entry + * + */ + movingDialogDisplayText?: string; + + /** + * Specifies text for drop tooltip in column moving dialog + * + */ + movingDialogDropTooltipText?: string; + + /** + * Specifies markup for drop tooltip in column moving dialog + * + */ + movingDialogDropTooltipMarkup?: string; + + /** + * Specifies caption for the move left dropdown button + * + */ + dropDownMoveLeftText?: string; + + /** + * Specifies caption for the move right dropdown button + * + */ + dropDownMoveRightText?: string; + + /** + * Specifies caption for the move first dropdown button + * + */ + dropDownMoveFirstText?: string; + + /** + * Specifies caption for the move last dropdown button + * + */ + dropDownMoveLastText?: string; + + /** + * Specifies tooltip text for the move indicator + * + */ + movingToolTipMove?: string; + + /** + * Specifies caption text for the feature chooser submenu button + * + */ + featureChooserSubmenuText?: string; + + /** + * Controls containment behavior of column moving dialog. + * + * owner The dialog will be draggable only in the grid area + * window The dialog will be draggable in the whole window area + */ + columnMovingDialogContainment?: 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 which is fired when a drag operation begins on a column header + */ + columnDragStart?: ColumnDragStartEvent; + + /** + * Event which is fired when a drag operation ends on a column header + */ + columnDragEnd?: ColumnDragEndEvent; + + /** + * Event which is fired when a drag operation is canceled + */ + columnDragCanceled?: ColumnDragCanceledEvent; + + /** + * Event which is fired when a column moving operation is initiated + */ + columnMoving?: ColumnMovingEvent; + + /** + * Event which is fired when a column moving operation completes + */ + columnMoved?: ColumnMovedEvent; + + /** + * Event fired before the moving dialog is opened. + */ + movingDialogOpening?: MovingDialogOpeningEvent; + + /** + * Event fired after the column chooser is already opened. + */ + movingDialogOpened?: MovingDialogOpenedEvent; + + /** + * Event fired every time the moving dialog changes its position. + */ + movingDialogDragged?: MovingDialogDraggedEvent; + + /** + * Event fired before the moving dialog is closed. + */ + movingDialogClosing?: MovingDialogClosingEvent; + + /** + * Event fired after the moving dialog has been closed. + */ + movingDialogClosed?: MovingDialogClosedEvent; + + /** + * Event fired before the contents of the model dialog are rendered. + */ + movingDialogContentsRendering?: MovingDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the model dialog are rendered. + */ + movingDialogContentsRendered?: MovingDialogContentsRenderedEvent; + + /** + * Event fired when move up button is pressed in the moving dialog + */ + movingDialogMoveUpButtonPressed?: MovingDialogMoveUpButtonPressedEvent; + + /** + * Event fired when move down button is pressed in the moving dialog + */ + movingDialogMoveDownButtonPressed?: MovingDialogMoveDownButtonPressedEvent; + + /** + * Event fired when column moving is initiated through dragging it in the moving dialog + */ + movingDialogDragColumnMoving?: MovingDialogDragColumnMovingEvent; + + /** + * Event fired when column moving is completed through dragging it in the moving dialog + */ + movingDialogDragColumnMoved?: MovingDialogDragColumnMovedEvent; + + /** + * Option for igGridColumnMoving + */ + [optionName: string]: any; +} +interface IgGridColumnMovingMethods { + /** + * Restoring overwritten functions + */ + destroy(): void; + + /** + * Moves a visible column at a specified place, in front or behind a target column or at a target index + * 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 of the column to be moved. It can be a key, a Multi-Column Header identificator, or an index in a number format. The latter is not supported when the grid contains multi-column headers. + * @param target An identifier of a column where the moved column should move to or an index at which the moved column should be moved to. In the case of a column identifier the column will be moved after it by default. + * @param after Specifies whether the column moved should be moved after or before the target column. + * @param inDom Specifies whether the column moving will be enacted through DOM manipulation or through rerendering of the grid. + * @param callback Specifies a custom function to be called when the column is moved. + */ + moveColumn(column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; +} +interface JQuery { + data(propertyName: "igGridColumnMoving"): IgGridColumnMovingMethods; +} + +interface JQuery { + igGridColumnMoving(methodName: "destroy"): void; + igGridColumnMoving(methodName: "moveColumn", column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; + + /** + * A list of column settings that specifies moving options on a per column basis. + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnMovingColumnSetting[]; + + /** + * A list of column settings that specifies moving options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnMovingColumnSetting[]): void; + + /** + * Specify the drag-and-drop mode for the feature + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Specify the drag-and-drop mode for the feature + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Specify the way columns will be rearranged + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "moveType"): string; + + /** + * Specify the way columns will be rearranged + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "moveType", optionValue: string): void; + + /** + * Gets if header cells should include an additional button that opens a moving helper dropdown. + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown"): boolean; + + /** + * Sets if header cells should include an additional button that opens a moving helper dropdown. + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown", optionValue: boolean): void; + + /** + * Gets width of column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth"): number; + + /** + * Sets width of column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth", optionValue: number): void; + + /** + * Gets height of column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight"): number; + + /** + * Sets height of column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight", optionValue: number): void; + + /** + * Gets time in milliseconds for animation duration to show/hide modal dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration"): number; + + /** + * Sets time in milliseconds for animation duration to show/hide modal dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration", optionValue: number): void; + + /** + * Gets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance"): number; + + /** + * Sets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance", optionValue: number): void; + + /** + * Gets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance"): number; + + /** + * Sets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance", optionValue: number): void; + + /** + * Gets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier"): number; + + /** + * Sets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier", optionValue: number): void; + + /** + * Gets the length (in pixels) of each individual scroll operation + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta"): number; + + /** + * Sets the length (in pixels) of each individual scroll operation + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; + + /** + * Gets whether the contents of the column being dragged will get hidden. The option is only + * relevant in immediate moving mode. + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag"): boolean; + + /** + * Sets whether the contents of the column being dragged will get hidden. The option is only + * relevant in immediate moving mode. + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag", optionValue: boolean): void; + + /** + * Gets the opacity of the drag markup, while a column header is being dragged. + * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration + * will be used with priority over this one. + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity"): number; + + /** + * Sets the opacity of the drag markup, while a column header is being dragged. + * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration + * will be used with priority over this one. + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity", optionValue: number): void; + + /** + * Gets caption for each move down button in the column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonDesc"): string; + + /** + * Sets caption for each move down button in the column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonDesc", optionValue: string): void; + + /** + * Gets caption for each move up button in the column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonAsc"): string; + + /** + * Sets caption for each move up button in the column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonAsc", optionValue: string): void; + + /** + * Gets caption text for the column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionText"): string; + + /** + * Sets caption text for the column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionText", optionValue: string): void; + + /** + * Gets caption text for the feature chooser entry + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDisplayText"): string; + + /** + * Sets caption text for the feature chooser entry + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDisplayText", optionValue: string): void; + + /** + * Gets text for drop tooltip in column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipText"): string; + + /** + * Sets text for drop tooltip in column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipText", optionValue: string): void; + + /** + * Gets markup for drop tooltip in column moving dialog + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup"): string; + + /** + * Sets markup for drop tooltip in column moving dialog + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup", optionValue: string): void; + + /** + * Gets caption for the move left dropdown button + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLeftText"): string; + + /** + * Sets caption for the move left dropdown button + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLeftText", optionValue: string): void; + + /** + * Gets caption for the move right dropdown button + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveRightText"): string; + + /** + * Sets caption for the move right dropdown button + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveRightText", optionValue: string): void; + + /** + * Gets caption for the move first dropdown button + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveFirstText"): string; + + /** + * Sets caption for the move first dropdown button + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveFirstText", optionValue: string): void; + + /** + * Gets caption for the move last dropdown button + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLastText"): string; + + /** + * Sets caption for the move last dropdown button + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLastText", optionValue: string): void; + + /** + * Gets tooltip text for the move indicator + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingToolTipMove"): string; + + /** + * Sets tooltip text for the move indicator + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingToolTipMove", optionValue: string): void; + + /** + * Gets caption text for the feature chooser submenu button + * + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "featureChooserSubmenuText"): string; + + /** + * Sets caption text for the feature chooser submenu button + * + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "featureChooserSubmenuText", optionValue: string): void; + + /** + * Controls containment behavior of column moving dialog. + * + * owner The dialog will be draggable only in the grid area + * window The dialog will be draggable in the whole window area + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnMovingDialogContainment"): string; + + /** + * Controls containment behavior of column moving dialog. + * + * owner The dialog will be draggable only in the grid area + * window The dialog will be draggable in the whole window area + * + * @optionValue New value to be set. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnMovingDialogContainment", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igGridColumnMoving(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. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igGridColumnMoving(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. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event which is fired when a drag operation begins on a column header + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnDragStart"): ColumnDragStartEvent; + + /** + * Event which is fired when a drag operation begins on a column header + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnDragStart", optionValue: ColumnDragStartEvent): void; + + /** + * Event which is fired when a drag operation ends on a column header + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnDragEnd"): ColumnDragEndEvent; + + /** + * Event which is fired when a drag operation ends on a column header + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnDragEnd", optionValue: ColumnDragEndEvent): void; + + /** + * Event which is fired when a drag operation is canceled + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnDragCanceled"): ColumnDragCanceledEvent; + + /** + * Event which is fired when a drag operation is canceled + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnDragCanceled", optionValue: ColumnDragCanceledEvent): void; + + /** + * Event which is fired when a column moving operation is initiated + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnMoving"): ColumnMovingEvent; + + /** + * Event which is fired when a column moving operation is initiated + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnMoving", optionValue: ColumnMovingEvent): void; + + /** + * Event which is fired when a column moving operation completes + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnMoved"): ColumnMovedEvent; + + /** + * Event which is fired when a column moving operation completes + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "columnMoved", optionValue: ColumnMovedEvent): void; + + /** + * Event fired before the moving dialog is opened. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpening"): MovingDialogOpeningEvent; + + /** + * Event fired before the moving dialog is opened. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpening", optionValue: MovingDialogOpeningEvent): void; + + /** + * Event fired after the column chooser is already opened. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpened"): MovingDialogOpenedEvent; + + /** + * Event fired after the column chooser is already opened. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpened", optionValue: MovingDialogOpenedEvent): void; + + /** + * Event fired every time the moving dialog changes its position. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragged"): MovingDialogDraggedEvent; + + /** + * Event fired every time the moving dialog changes its position. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragged", optionValue: MovingDialogDraggedEvent): void; + + /** + * Event fired before the moving dialog is closed. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosing"): MovingDialogClosingEvent; + + /** + * Event fired before the moving dialog is closed. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosing", optionValue: MovingDialogClosingEvent): void; + + /** + * Event fired after the moving dialog has been closed. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosed"): MovingDialogClosedEvent; + + /** + * Event fired after the moving dialog has been closed. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosed", optionValue: MovingDialogClosedEvent): void; + + /** + * Event fired before the contents of the model dialog are rendered. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendering"): MovingDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the model dialog are rendered. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendering", optionValue: MovingDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the model dialog are rendered. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendered"): MovingDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the model dialog are rendered. + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendered", optionValue: MovingDialogContentsRenderedEvent): void; + + /** + * Event fired when move up button is pressed in the moving dialog + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveUpButtonPressed"): MovingDialogMoveUpButtonPressedEvent; + + /** + * Event fired when move up button is pressed in the moving dialog + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveUpButtonPressed", optionValue: MovingDialogMoveUpButtonPressedEvent): void; + + /** + * Event fired when move down button is pressed in the moving dialog + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveDownButtonPressed"): MovingDialogMoveDownButtonPressedEvent; + + /** + * Event fired when move down button is pressed in the moving dialog + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveDownButtonPressed", optionValue: MovingDialogMoveDownButtonPressedEvent): void; + + /** + * Event fired when column moving is initiated through dragging it in the moving dialog + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoving"): MovingDialogDragColumnMovingEvent; + + /** + * Event fired when column moving is initiated through dragging it in the moving dialog + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoving", optionValue: MovingDialogDragColumnMovingEvent): void; + + /** + * Event fired when column moving is completed through dragging it in the moving dialog + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoved"): MovingDialogDragColumnMovedEvent; + + /** + * Event fired when column moving is completed through dragging it in the moving dialog + * + * @optionValue Define event handler function. + */ + igGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoved", optionValue: MovingDialogDragColumnMovedEvent): void; + igGridColumnMoving(options: IgGridColumnMoving): JQuery; + igGridColumnMoving(optionLiteral: 'option', optionName: string): any; + igGridColumnMoving(optionLiteral: 'option', options: IgGridColumnMoving): JQuery; + igGridColumnMoving(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridColumnMoving(methodName: string, ...methodParams: any[]): any; +} interface IgPopoverHeaderTemplate { /** * Controls whether the popover renders a functional close button @@ -37809,25 +40606,6 @@ interface ShowingEvent { } 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 { @@ -37835,25 +40613,6 @@ interface ShownEvent { } 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 { @@ -37861,25 +40620,6 @@ interface HidingEvent { } 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 { @@ -37887,25 +40627,6 @@ interface HiddenEvent { } 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 { @@ -37918,7 +40639,7 @@ interface IgGridFeatureChooserPopover { * 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 + * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.igpopover#options:directionPriority) property * "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 @@ -37926,6 +40647,12 @@ interface IgGridFeatureChooserPopover { */ direction?: string; + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + */ + directionPriority?: any[]; + /** * 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 * @@ -38008,41 +40735,21 @@ interface IgGridFeatureChooserPopover { /** * 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; @@ -38271,6 +40978,20 @@ interface JQuery { */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "direction", optionValue: string): void; + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "directionPriority"): any[]; + + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + * + * @optionValue New value to be set. + */ + igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "directionPriority", optionValue: any[]): 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 */ @@ -38419,21 +41140,11 @@ interface JQuery { /** * 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. */ @@ -38441,21 +41152,11 @@ interface JQuery { /** * 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. */ @@ -38463,21 +41164,11 @@ interface JQuery { /** * 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. */ @@ -38485,21 +41176,11 @@ interface JQuery { /** * 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. */ @@ -38595,6 +41276,4041 @@ interface JQuery { igGridFeatureChooser(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igGridFeatureChooser(methodName: string, ...methodParams: any[]): any; } +interface IgGridFilteringColumnSettingDefaultExpressions { + /** + * Option for IgGridFilteringColumnSettingDefaultExpressions + */ + [optionName: string]: any; +} + +interface IgGridFilteringColumnSetting { + /** + * 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; + + /** + * Enables/disables filtering for the column. + * + */ + allowFiltering?: boolean; + + /** + * Initial filtering condition for the column. + * + * + * Valid values: + * "empty" + * "notEmpty" + * "null" + * "notNull" + * "equals" + * "doesNotEqual" + * "startsWith" + * "contains" + * "doesNotContain" + * "endsWith" + * "greaterThan" + * "lessThan" + * "greaterThanOrEqualTo" + * "lessThanOrEqualTo" + * "true" + * "false" + * "on" + * "notOn" + * "before" + * "after" + * "today" + * "yesterday" + * "thisMonth" + * "lastMonth" + * "nextMonth" + * "thisYear" + * "nextYear" + * "lastYear" + */ + condition?: string|boolean; + + /** + * An array of strings that determine which [conditions](ui.iggridfiltering#options:columnSettings.condition) to display for this column. + * + */ + conditionList?: any[]; + + /** + * Initial filtering expressions - if set they will be applied on initialization together with the preset [condition](ui.iggridfiltering#options:columnSettings.condition). + * + */ + defaultExpressions?: IgGridFilteringColumnSettingDefaultExpressions; + + /** + * An object used to specify custom filtering conditions as objects for this column. + * + * labelText The label as it will appear in the column's condition dropdown. + * expressionText The text to display in the editor when requireExpr is false. + * requireExpr If this condition requires the user to input a filtering expression. + * filterImgIcon Class applied to the dropdown item when in simple mode. + * filterFunc The custom comparing filter function. Signature: function (value, expression, dataType, ignoreCase, preciseDateFormat). + */ + customConditions?: any; + + /** + * Option for IgGridFilteringColumnSetting + */ + [optionName: string]: any; +} + +interface IgGridFilteringNullTexts { + startsWith?: string; + endsWith?: string; + contains?: string; + doesNotContain?: string; + equals?: string; + doesNotEqual?: string; + greaterThan?: string; + lessThan?: string; + greaterThanOrEqualTo?: string; + lessThanOrEqualTo?: string; + on?: string; + notOn?: string; + after?: string; + before?: string; + thisMonth?: string; + lastMonth?: string; + nextMonth?: string; + thisYear?: string; + lastYear?: string; + nextYear?: string; + empty?: string; + notEmpty?: string; + null?: string; + notNull?: string; + + /** + * Option for IgGridFilteringNullTexts + */ + [optionName: string]: any; +} + +interface IgGridFilteringLabels { + noFilter?: string; + clear?: string; + startsWith?: string; + endsWith?: string; + contains?: string; + doesNotContain?: string; + equals?: string; + doesNotEqual?: string; + greaterThan?: string; + lessThan?: string; + greaterThanOrEqualTo?: string; + lessThanOrEqualTo?: string; + trueLabel?: string; + falseLabel?: string; + after?: string; + before?: string; + today?: string; + yesterday?: string; + thisMonth?: string; + lastMonth?: string; + nextMonth?: string; + thisYear?: string; + lastYear?: string; + nextYear?: string; + on?: string; + notOn?: string; + advancedButtonLabel?: string; + filterDialogCaptionLabel?: string; + filterDialogConditionLabel1?: string; + filterDialogConditionLabel2?: string; + filterDialogOkLabel?: string; + filterDialogCancelLabel?: string; + filterDialogAnyLabel?: string; + filterDialogAllLabel?: string; + filterDialogAddLabel?: string; + filterDialogErrorLabel?: string; + filterSummaryTitleLabel?: string; + filterDialogClearAllLabel?: string; + empty?: string; + notEmpty?: string; + nullLabel?: string; + notNull?: string; + true?: string; + false?: string; + + /** + * Option for IgGridFilteringLabels + */ + [optionName: string]: any; +} + +interface DataFilteringEvent { + (event: Event, ui: DataFilteringEventUIParam): void; +} + +interface DataFilteringEventUIParam { +} + +interface DataFilteredEvent { + (event: Event, ui: DataFilteredEventUIParam): void; +} + +interface DataFilteredEventUIParam { +} + +interface FilterDialogOpeningEvent { + (event: Event, ui: FilterDialogOpeningEventUIParam): void; +} + +interface FilterDialogOpeningEventUIParam { +} + +interface FilterDialogOpenedEvent { + (event: Event, ui: FilterDialogOpenedEventUIParam): void; +} + +interface FilterDialogOpenedEventUIParam { +} + +interface FilterDialogMovingEvent { + (event: Event, ui: FilterDialogMovingEventUIParam): void; +} + +interface FilterDialogMovingEventUIParam { +} + +interface FilterDialogFilterAddingEvent { + (event: Event, ui: FilterDialogFilterAddingEventUIParam): void; +} + +interface FilterDialogFilterAddingEventUIParam { +} + +interface FilterDialogFilterAddedEvent { + (event: Event, ui: FilterDialogFilterAddedEventUIParam): void; +} + +interface FilterDialogFilterAddedEventUIParam { +} + +interface FilterDialogClosingEvent { + (event: Event, ui: FilterDialogClosingEventUIParam): void; +} + +interface FilterDialogClosingEventUIParam { +} + +interface FilterDialogClosedEvent { + (event: Event, ui: FilterDialogClosedEventUIParam): void; +} + +interface FilterDialogClosedEventUIParam { +} + +interface FilterDialogContentsRenderingEvent { + (event: Event, ui: FilterDialogContentsRenderingEventUIParam): void; +} + +interface FilterDialogContentsRenderingEventUIParam { +} + +interface FilterDialogContentsRenderedEvent { + (event: Event, ui: FilterDialogContentsRenderedEventUIParam): void; +} + +interface FilterDialogContentsRenderedEventUIParam { +} + +interface FilterDialogFilteringEvent { + (event: Event, ui: FilterDialogFilteringEventUIParam): void; +} + +interface FilterDialogFilteringEventUIParam { +} + +interface IgGridFiltering { + /** + * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * + */ + caseSensitive?: boolean; + + /** + * Enable/disable footer visibility with summary info about the filter. + * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). + * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * + */ + filterSummaryAlwaysVisible?: boolean; + + /** + * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * + */ + renderFC?: boolean; + + /** + * Summary template that will appear in the bottom left corner of the footer. Has the format '${matches} matching records'. + * + */ + filterSummaryTemplate?: string; + + /** + * Type of animations for the column filter dropdowns. + * + * + * Valid values: + * "linear" The column filtering drop downs are shown with a linear animation. + * "none" No animation is used when showing the filtering drop downs. + */ + filterDropDownAnimations?: string; + + /** + * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * + */ + filterDropDownAnimationDuration?: number; + + /** + * Width of the column filter dropdowns. + * + * + * Valid values: + * "string" The width in pixels (0px) + * "number" The width in pixels as a number (0) + */ + filterDropDownWidth?: string|number; + + /** + * Height of the column filter dropdowns. + * + * string The height of the column filter dropdowns in pixels (0px). + * number The height of the column filter dropdowns in pixels as a number (0). + */ + filterDropDownHeight?: any; + + /** + * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + */ + filterExprUrlKey?: string; + + /** + * Enable/disable filter icons visibility. + * + * + * Valid values: + * "true" All predefined filters in the filter dropdowns will have icons rendered in front of the text. + * "false" No icons will be rendered. + */ + filterDropDownItemIcons?: boolean; + + /** + * A list of column settings that specifies custom filtering options on a per column basis. + * + */ + columnSettings?: IgGridFilteringColumnSetting[]; + + /** + * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * + * + * Valid values: + * "remote" Filtering is performed by a remote end-point. + * "local" Filtering is performed locally by the [$.ig.DataSource](ig.datasource). + */ + type?: string; + + /** + * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * + */ + filterDelay?: number; + + /** + * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * + * + * Valid values: + * "simple" Renders just a filter row. + * "advanced" Allows to configure multiple filters from a dialog - Excel style. + */ + mode?: string; + + /** + * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * + */ + advancedModeEditorsVisible?: boolean; + + /** + * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * + * + * Valid values: + * "left" + * "right" + */ + advancedModeHeaderButtonLocation?: string; + + /** + * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * Valid values: + * "string" The dialog window width in pixels (370px). + * "number" The dialog window width in pixels as a number (370). + */ + filterDialogWidth?: string|number; + + /** + * default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * Valid values: + * "string" The dialog window height in pixels (350px). + * "number" The dialog window height in pixels as a number (350). + */ + filterDialogHeight?: string|number; + + /** + * Width of the filtering condition dropdowns in the advanced filter dialog. + * + * + * Valid values: + * "string" The filtering condition dropdowns width in pixels (80px). + * "number" The filtering condition dropdowns width in pixels as a number (80). + */ + filterDialogFilterDropDownDefaultWidth?: string|number; + + /** + * Width of the filtering expression input boxes in the advanced filter dialog. + * + * + * Valid values: + * "string" The filtering expression input boxes width in pixels (80px). + * "number" The filtering expression input boxes width in pixels as a number (80). + */ + filterDialogExprInputDefaultWidth?: string|number; + + /** + * Width of the column chooser dropdowns in the advanced filter dialog. + * + * + * Valid values: + * "string" The column chooser dropdowns width in pixels (80px). + * "number" The column chooser dropdowns width in pixels as a number (80). + */ + filterDialogColumnDropDownDefaultWidth?: string|number; + + /** + * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * + */ + renderFilterButton?: boolean; + + /** + * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * + * + * Valid values: + * "left" The button is rendered on the left. + * "right" The button is rendered on the right. + */ + filterButtonLocation?: string; + + /** + * List of configurable and localized null texts that will be used for the filter editors. + * + */ + nullTexts?: IgGridFilteringNullTexts; + + /** + * A list of configurable and localized labels that are used for the predefined filtering conditions in the filter dropdowns. + * + */ + labels?: IgGridFilteringLabels; + + /** + * Custom tooltip template for the filter button, when a filter is applied. + * + */ + tooltipTemplate?: string; + + /** + * Custom template for add condition area in the filter dialog. The default template is "

${label1}
${label2}
". + * + */ + filterDialogAddConditionTemplate?: string; + + /** + * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * + */ + filterDialogAddConditionDropDownTemplate?: string; + + /** + * Custom template for filter dialog. + * Each DOM element which is used for selecting filter conditions/columns/filter expressions has "data-*" attribute. + * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". + * NOTE: The template is supported only with . + * The default template is " ". + * + */ + filterDialogFilterTemplate?: string; + + /** + * Custom template for options in condition list in filter dialog. The default template is "". + * + */ + filterDialogFilterConditionTemplate?: string; + + /** + * Add button width - in the advanced filter dialog. + * + * + * Valid values: + * "string" The dialog Add button width in pixels (100px). + * "number" The dialog Add button width in pixels as a number (100). + */ + filterDialogAddButtonWidth?: string|number; + + /** + * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * + * + * Valid values: + * "string" The advanced filter dialog Ok and Cancel buttons width in pixels (120px). + * "number" The advanced filter dialog Ok and Cancel buttons width in pixels as a number (120). + */ + filterDialogOkCancelButtonWidth?: string|number; + + /** + * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * + */ + filterDialogMaxFilterCount?: number; + + /** + * Controls containment behavior. + * + * owner The filter dialog will be draggable only within the grid area. + * window The filter dialog will be draggable within the whole window area. + */ + filterDialogContainment?: string; + + /** + * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * + */ + showEmptyConditions?: boolean; + + /** + * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * + */ + showNullConditions?: boolean; + + /** + * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + featureChooserText?: string; + + /** + * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + featureChooserTextHide?: string; + + /** + * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * + */ + featureChooserTextAdvancedFilter?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + dialogWidget?: string; + + /** + * Enables/disables filtering persistence between states. + * + */ + persist?: boolean; + + /** + * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * + */ + inherit?: boolean; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + */ + dataFiltering?: DataFilteringEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + dataFiltered?: DataFilteredEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + dropDownOpening?: DropDownOpeningEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + dropDownOpened?: DropDownOpenedEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + dropDownClosing?: DropDownClosingEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + dropDownClosed?: DropDownClosedEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + filterDialogOpening?: FilterDialogOpeningEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + filterDialogOpened?: FilterDialogOpenedEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + filterDialogMoving?: FilterDialogMovingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + filterDialogFilterAdding?: FilterDialogFilterAddingEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + filterDialogFilterAdded?: FilterDialogFilterAddedEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + filterDialogClosing?: FilterDialogClosingEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + filterDialogClosed?: FilterDialogClosedEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + filterDialogContentsRendering?: FilterDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + filterDialogContentsRendered?: FilterDialogContentsRenderedEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + filterDialogFiltering?: FilterDialogFilteringEvent; + + /** + * Option for igGridFiltering + */ + [optionName: string]: any; +} +interface IgGridFilteringMethods { + /** + * Destroys the filtering widget - remove fitler row, unbinds events, returns the grid to its previous state. + */ + destroy(): void; + + /** + * Returns the count of data records that match filtering conditions + */ + getFilteringMatchesCount(): number; + + /** + * Toggle filter row when mode is simple or [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is true. Otherwise show/hide advanced dialog. + * + * @param event Column key + */ + toggleFilterRowByFeatureChooser(event: string): void; + + /** + * Applies filtering programmatically and updates the UI by default. + * + * @param expressions An array of filtering expressions, each one having the format {fieldName: , expr: , cond: , logic: } where fieldName is the key of the column, expr is the actual expression string with which we would like to filter, logic is 'AND' or 'OR', and cond is one of the following strings: "equals", "doesNotEqual", "contains", "doesNotContain", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo", "true", "false", "null", "notNull", "empty", "notEmpty", "startsWith", "endsWith", "today", "yesterday", "on", "notOn", "thisMonth", "lastMonth", "nextMonth", "before", "after", "thisYear", "lastYear", "nextYear". The difference between the empty and null filtering conditions is that empty includes null, NaN, and undefined, as well as the empty string. + * @param updateUI specifies whether the filter row should be also updated once the grid is filtered + * @param addedFromAdvanced + */ + filter(expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + + /** + * Check whether filterCondition requires or not filtering expression - e.g. if filterCondition is "lastMonth", "thisMonth", "null", "notNull", "true", "false", etc. then filtering expression is NOT required + * + * @param filterCondition filtering condition - e.g. "true", "false", "yesterday", "empty", "null", etc. + */ + requiresFilteringExpression(filterCondition: string): boolean; +} +interface JQuery { + data(propertyName: "igGridFiltering"): IgGridFilteringMethods; +} + +interface JQuery { + igGridFiltering(methodName: "destroy"): void; + igGridFiltering(methodName: "getFilteringMatchesCount"): number; + igGridFiltering(methodName: "toggleFilterRowByFeatureChooser", event: string): void; + igGridFiltering(methodName: "filter", expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + igGridFiltering(methodName: "requiresFilteringExpression", filterCondition: string): boolean; + + /** + * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "caseSensitive"): boolean; + + /** + * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; + + /** + * Enable/disable footer visibility with summary info about the filter. + * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). + * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible"): boolean; + + /** + * Enable/disable footer visibility with summary info about the filter. + * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). + * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible", optionValue: boolean): void; + + /** + * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "renderFC"): boolean; + + /** + * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "renderFC", optionValue: boolean): void; + + /** + * Summary template that will appear in the bottom left corner of the footer. Has the format '${matches} matching records'. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterSummaryTemplate"): string; + + /** + * Summary template that will appear in the bottom left corner of the footer. Has the format '${matches} matching records'. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterSummaryTemplate", optionValue: string): void; + + /** + * Type of animations for the column filter dropdowns. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimations"): string; + + /** + * Type of animations for the column filter dropdowns. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimations", optionValue: string): void; + + /** + * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration"): number; + + /** + * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration", optionValue: number): void; + + /** + * Width of the column filter dropdowns. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownWidth"): string|number; + + /** + * Width of the column filter dropdowns. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownWidth", optionValue: string|number): void; + + /** + * Height of the column filter dropdowns. + * + * string The height of the column filter dropdowns in pixels (0px). + * number The height of the column filter dropdowns in pixels as a number (0). + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownHeight"): any; + + /** + * Height of the column filter dropdowns. + * + * string The height of the column filter dropdowns in pixels (0px). + * number The height of the column filter dropdowns in pixels as a number (0). + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownHeight", optionValue: any): void; + + /** + * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey"): string; + + /** + * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey", optionValue: string): void; + + /** + * Enable/disable filter icons visibility. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownItemIcons"): boolean; + + /** + * Enable/disable filter icons visibility. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDropDownItemIcons", optionValue: boolean): void; + + /** + * A list of column settings that specifies custom filtering options on a per column basis. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "columnSettings"): IgGridFilteringColumnSetting[]; + + /** + * A list of column settings that specifies custom filtering options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridFilteringColumnSetting[]): void; + + /** + * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "type"): string; + + /** + * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDelay"): number; + + /** + * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDelay", optionValue: number): void; + + /** + * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible"): boolean; + + /** + * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible", optionValue: boolean): void; + + /** + * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "advancedModeHeaderButtonLocation"): string; + + /** + * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "advancedModeHeaderButtonLocation", optionValue: string): void; + + /** + * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogWidth"): string|number; + + /** + * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogWidth", optionValue: string|number): void; + + /** + * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogHeight"): string|number; + + /** + * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogHeight", optionValue: string|number): void; + + /** + * Width of the filtering condition dropdowns in the advanced filter dialog. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterDropDownDefaultWidth"): string|number; + + /** + * Width of the filtering condition dropdowns in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterDropDownDefaultWidth", optionValue: string|number): void; + + /** + * Width of the filtering expression input boxes in the advanced filter dialog. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogExprInputDefaultWidth"): string|number; + + /** + * Width of the filtering expression input boxes in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogExprInputDefaultWidth", optionValue: string|number): void; + + /** + * Width of the column chooser dropdowns in the advanced filter dialog. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogColumnDropDownDefaultWidth"): string|number; + + /** + * Width of the column chooser dropdowns in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogColumnDropDownDefaultWidth", optionValue: string|number): void; + + /** + * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton"): boolean; + + /** + * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton", optionValue: boolean): void; + + /** + * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterButtonLocation"): string; + + /** + * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterButtonLocation", optionValue: string): void; + + /** + * List of configurable and localized null texts that will be used for the filter editors. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "nullTexts"): IgGridFilteringNullTexts; + + /** + * List of configurable and localized null texts that will be used for the filter editors. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "nullTexts", optionValue: IgGridFilteringNullTexts): void; + + /** + * A list of configurable and localized labels that are used for the predefined filtering conditions in the filter dropdowns. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "labels"): IgGridFilteringLabels; + + /** + * A list of configurable and localized labels that are used for the predefined filtering conditions in the filter dropdowns. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "labels", optionValue: IgGridFilteringLabels): void; + + /** + * Custom tooltip template for the filter button, when a filter is applied. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Custom tooltip template for the filter button, when a filter is applied. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate"): string; + + /** + * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate", optionValue: string): void; + + /** + * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate"): string; + + /** + * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate", optionValue: string): void; + + /** + * Custom template for filter dialog. + * Each DOM element which is used for selecting filter conditions/columns/filter expressions has "data-*" attribute. + * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". + * NOTE: The template is supported only with . + * The default template is " ". + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate"): string; + + /** + * Custom template for filter dialog. + * Each DOM element which is used for selecting filter conditions/columns/filter expressions has "data-*" attribute. + * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". + * NOTE: The template is supported only with . + * The default template is " ". + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate", optionValue: string): void; + + /** + * Custom template for options in condition list in filter dialog. The default template is "". + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate"): string; + + /** + * Custom template for options in condition list in filter dialog. The default template is "". + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate", optionValue: string): void; + + /** + * Add button width - in the advanced filter dialog. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddButtonWidth"): string|number; + + /** + * Add button width - in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddButtonWidth", optionValue: string|number): void; + + /** + * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOkCancelButtonWidth"): string|number; + + /** + * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOkCancelButtonWidth", optionValue: string|number): void; + + /** + * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount"): number; + + /** + * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount", optionValue: number): void; + + /** + * Controls containment behavior. + * + * owner The filter dialog will be draggable only within the grid area. + * window The filter dialog will be draggable within the whole window area. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContainment"): string; + + /** + * Controls containment behavior. + * + * owner The filter dialog will be draggable only within the grid area. + * window The filter dialog will be draggable within the whole window area. + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContainment", optionValue: string): void; + + /** + * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions"): boolean; + + /** + * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions", optionValue: boolean): void; + + /** + * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "showNullConditions"): boolean; + + /** + * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "showNullConditions", optionValue: boolean): void; + + /** + * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "featureChooserText"): string; + + /** + * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "featureChooserText", optionValue: string): void; + + /** + * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextHide"): string; + + /** + * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextHide", optionValue: string): void; + + /** + * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextAdvancedFilter"): string; + + /** + * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextAdvancedFilter", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igGridFiltering(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. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables filtering persistence between states. + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables/disables filtering persistence between states. + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * + */ + igGridFiltering(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * + * + * @optionValue New value to be set. + */ + igGridFiltering(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltering"): DataFilteringEvent; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltering", optionValue: DataFilteringEvent): void; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltered"): DataFilteredEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dataFiltered", optionValue: DataFilteredEvent): void; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening"): DropDownOpeningEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening", optionValue: DropDownOpeningEvent): void; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened"): DropDownOpenedEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened", optionValue: DropDownOpenedEvent): void; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing"): DropDownClosingEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing", optionValue: DropDownClosingEvent): void; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed"): DropDownClosedEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed", optionValue: DropDownClosedEvent): void; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening"): FilterDialogOpeningEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening", optionValue: FilterDialogOpeningEvent): void; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened"): FilterDialogOpenedEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened", optionValue: FilterDialogOpenedEvent): void; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving"): FilterDialogMovingEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving", optionValue: FilterDialogMovingEvent): void; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding"): FilterDialogFilterAddingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding", optionValue: FilterDialogFilterAddingEvent): void; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded"): FilterDialogFilterAddedEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded", optionValue: FilterDialogFilterAddedEvent): void; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing"): FilterDialogClosingEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing", optionValue: FilterDialogClosingEvent): void; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed"): FilterDialogClosedEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed", optionValue: FilterDialogClosedEvent): void; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering"): FilterDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering", optionValue: FilterDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered"): FilterDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered", optionValue: FilterDialogContentsRenderedEvent): void; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering"): FilterDialogFilteringEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + * + * @optionValue Define event handler function. + */ + igGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering", optionValue: FilterDialogFilteringEvent): void; + igGridFiltering(options: IgGridFiltering): JQuery; + igGridFiltering(optionLiteral: 'option', optionName: string): any; + igGridFiltering(optionLiteral: 'option', options: IgGridFiltering): JQuery; + igGridFiltering(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGridFiltering(methodName: string, ...methodParams: any[]): any; +} +interface IgGridColumnGroupOptions { + /** + * Sets whether the group is expanded or collapsed. Applied only if the allowGroupCollapsing is set to true. + * + */ + expanded?: boolean; + + /** + * Sets whether expansion indicators are visible in the group header. + * + */ + allowGroupCollapsing?: boolean; + + /** + * Sets when should the group be hidden. Applied only if the allowGroupCollapsing is set to true. + * + * + * Valid values: + * "never" never hide the group + * "always" always hide the group + * "parentcollapsed" hide the group when its parent group is collapsed + * "parentexpanded" hide the group when its parent group is expanded + */ + hidden?: string; + + /** + * Option for IgGridColumnGroupOptions + */ + [optionName: string]: any; +} + +interface IgGridColumn { + /** + * Header text for the specified column. + * + */ + headerText?: string; + + /** + * The property in the data source to which the column is bound. Also used to identify the column by, and find specific columns with API methods such as [columnByKey](ui.iggrid#methods:columnByKey). + * + */ + key?: string; + + /** + * Reference to a function (string or function) which will be used for formatting the cell values. The function should accept a value and return the new formatted value. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * Valid values: + * "string" The name of the function which will be used for formatting the cell values. + * "function" Function which will be used for formatting the cell values. The function should accept a value and return the new formatted value. + */ + formatter?: string|Function; + + /** + * Gets/Sets the type of formatting for cells of the column. Default value is null. Checkout [Formatting Dates, Numbers and Strings](http://www.igniteui.com/help/formatting-dates-numbers-and-strings) for details on the valid formatting specifiers. + * + * If dataType is "date", then supported formats are following: "date", "dateLong", "dateTime", "time", "timeLong", "MM/dd/yyyy", "MMM-d, yy, h:mm:ss tt", "dddd d MMM", etc. + * If dataType is "number", then supported numeric formats are following: "number", "currency", "percent", "int", "double", "0.00", "#.0####", "0", "#.#######", etc. + * The value of "double" will be similar to "number", but with unlimited maximum number of decimal places. + * The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. + * If dataType is "string" or not set, then format is rendered as it is with replacement of possible "{0}" flag by value in cell. Example, if format is set to "Name: {0}" and value in cell is "Bob", then value will appear as "Name: Bob" + * If value is set to "checkbox", then checkboxes are used regardless of renderCheckboxes option of the grid. That has effect only when dataType option of column is set to "bool". + */ + format?: string; + + /** + * Data type of the column cell values: string, number, bool, date, object. + * + */ + dataType?: string|number|boolean|Date|Object; + + /** + * Width of the column in pixels or percentage. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text).If width is not defined and [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) is set, it is assumed for all columns. + * + * + * + * Valid values: + * "string" The column width can be set in pixels (px), percentage (%) or as '*' in order to auto-size based on the cells and header content. + * "number" The column width can be set as a number + */ + width?: string|number; + + /** + * Initial visibility of the column. A column can be hidden without the Hiding feature being enabled but there will be no UI for unhiding it. Columns can be defined as hidden in the options of the Hiding feature as well and those definitions take precedence. + * + */ + hidden?: boolean; + + /** + * Sets a template for an individual column. the contents of the template should be the HTML markup that goes inside the table cell, or the entire table cell markup. [Here's an example of creating a basic column template](http://www.igniteui.com/help/creating-a-basic-column-template-in-the-iggrid) + * + */ + template?: string; + + /** + * Sets whether column data is derived from the datasource. If set to true, then the cells in this column are not bound to the data source. The data in this column is populated using [formula](ui.iggrid#options:columns.formula), or using [unboundValues](ui.iggrid#options:columns.unboundValues), or through the [setUnboundValues](ui.iggrid#methods:setUnboundValues) API method. [Here's an overview of the unbound columns feature](http://www.igniteui.com/help/iggrid-unboundcolumns-overview) + * + */ + unbound?: boolean; + + /** + * Options used to configure collapsible column [groups](ui.iggrid#options:columns.group). + * + */ + groupOptions?: IgGridColumnGroupOptions; + + /** + * Array of child column definitions. If the column has the property group than the grid has multi column headers. + * + */ + group?: any[]; + + /** + * Determines the way in which dates will be displayed in the grid for this column. + * + * + * Valid values: + * "local" The dates for this column will be rendered in the client's local timezone. + * "utc" The dates for this column will be rendered in their UTC representation. + */ + dateDisplayType?: string; + + /** + * This option has been deprecated as of the June 2016 service release. + * Adjust span of multi column header cell. Use option rowSpan. + */ + rowspan?: number; + + /** + * A reference to or the name of a JavaScript function, which will calculate the value of the current cell based on other cell values in the same row. Used with [unbound columns](ui.iggrid#options:columns.unbound). + * + * + * Valid values: + * "string" The name of the JavaScript function. + * "function" Reference to the JavaScript function. + */ + formula?: string|Function; + + /** + * Array of values which will be populated in the column cells at initialization, if the column is [unbound](ui.iggrid#options:columns.unbound). + * + */ + unboundValues?: any[]; + + /** + * Space-separated list of CSS classes to be applied on the header cell of this column. + * + */ + headerCssClass?: string; + + /** + * Space-separated list of CSS classes to be applied on the data cells of this column. The class is not applied if the column has a column [template](ui.iggrid#options:columns.template) defined, which contains full definition in the template. + * + */ + columnCssClass?: string; + + /** + * This option is applicable only for columns with [dataType](ui.iggrid#options:columns.dataType) of object. Reference to a function, or the name of the function, that will be used for complex data extraction from the data records, whose return value will be used for all data operations associated with this column and will be displayed as cell value. [Here you can find more examples of how to setup a column mapper](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-mapper) + * + * + * Valid values: + * "string" The name of the mapper function. + * "function" Reference to the mapper function. + */ + mapper?: string|Function; + + /** + * Specifies the row index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + rowIndex?: number; + + /** + * Specifies the column index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + columnIndex?: number; + + /** + * Specifies the navigation index of the cell for the TAB sequence when the cells are in edit mode in a Multi-Row Layout grid. Has no effect otherwise. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + navigationIndex?: number; + + /** + * Specifies the colSpan of the cell in a Multi-Row Layout configuration. colSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + colSpan?: number; + + /** + * Specifies the rowSpan of the cell in a Multi-Row Layout configuration. rowSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout). If multi-row-layout is not used but multi-column-header is set then this option is used to adjust span of header cell. + * + */ + rowSpan?: number; + + /** + * Option for IgGridColumn + */ + [optionName: string]: any; +} + +interface IgGridFeature { + /** + * Name of the feature to be enabled. + */ + name?: string; + + /** + * Option for IgGridFeature + */ + [optionName: string]: any; +} + +interface IgGridRestSettingsCreate { + /** + * 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 IgGridRestSettingsCreate + */ + [optionName: string]: any; +} + +interface IgGridRestSettingsUpdate { + /** + * 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 IgGridRestSettingsUpdate + */ + [optionName: string]: any; +} + +interface IgGridRestSettingsRemove { + /** + * 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 IgGridRestSettingsRemove + */ + [optionName: string]: any; +} + +interface IgGridRestSettings { + /** + * Settings for create requests + * + */ + create?: IgGridRestSettingsCreate; + + /** + * Settings for update requests + */ + update?: IgGridRestSettingsUpdate; + + /** + * Settings for remove requests + */ + remove?: IgGridRestSettingsRemove; + + /** + * 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. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + contentType?: string; + + /** + * Option for IgGridRestSettings + */ + [optionName: string]: any; +} + +interface IgGridScrollSettings { + /** + * Sets gets current vertical position. + * + */ + scrollTop?: number; + + /** + * Sets gets current horizontal position. + * + */ + scrollLeft?: number; + + /** + * Sets gets the step of the default scrolling behavior when using the mouse wheel. + * + */ + wheelStep?: number; + + /** + * Sets gets if smoother scrolling with small intertia should be used when using the 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](ui.iggrid#options:scrollSettings.smoothing). + * + */ + 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](ui.iggrid#options:scrollSettings.smoothing). + * + */ + smoothingDuration?: number; + + /** + * Sets gets the modifier for how much the inertia scrolls on touch devices. Note: Value set to 0 would disable touch movements. Value set to -1 would invert them. + * + */ + inertiaStep?: number; + + /** + * Sets gets the modifier for how long the inertia last on touch devices. + * + */ + inertiaDuration?: number; + + /** + * Option for IgGridScrollSettings + */ + [optionName: string]: any; +} + +interface CellClickEvent { + (event: Event, ui: CellClickEventUIParam): void; +} + +interface CellClickEventUIParam { +} + +interface CellRightClickEvent { + (event: Event, ui: CellRightClickEventUIParam): void; +} + +interface CellRightClickEventUIParam { +} + +interface DataRenderingEvent { + (event: Event, ui: DataRenderingEventUIParam): void; +} + +interface DataRenderingEventUIParam { +} + +interface DataRenderedEvent { + (event: Event, ui: DataRenderedEventUIParam): void; +} + +interface DataRenderedEventUIParam { +} + +interface HeaderRenderingEvent { + (event: Event, ui: HeaderRenderingEventUIParam): void; +} + +interface HeaderRenderingEventUIParam { +} + +interface HeaderRenderedEvent { + (event: Event, ui: HeaderRenderedEventUIParam): void; +} + +interface HeaderRenderedEventUIParam { +} + +interface CaptionRenderingEvent { + (event: Event, ui: CaptionRenderingEventUIParam): void; +} + +interface CaptionRenderingEventUIParam { +} + +interface CaptionRenderedEvent { + (event: Event, ui: CaptionRenderedEventUIParam): void; +} + +interface CaptionRenderedEventUIParam { +} + +interface FooterRenderingEvent { + (event: Event, ui: FooterRenderingEventUIParam): void; +} + +interface FooterRenderingEventUIParam { +} + +interface FooterRenderedEvent { + (event: Event, ui: FooterRenderedEventUIParam): void; +} + +interface FooterRenderedEventUIParam { +} + +interface HeaderCellRenderedEvent { + (event: Event, ui: HeaderCellRenderedEventUIParam): void; +} + +interface HeaderCellRenderedEventUIParam { +} + +interface RowsRenderingEvent { + (event: Event, ui: RowsRenderingEventUIParam): void; +} + +interface RowsRenderingEventUIParam { +} + +interface RowsRenderedEvent { + (event: Event, ui: RowsRenderedEventUIParam): void; +} + +interface RowsRenderedEventUIParam { +} + +interface SchemaGeneratedEvent { + (event: Event, ui: SchemaGeneratedEventUIParam): void; +} + +interface SchemaGeneratedEventUIParam { +} + +interface ColumnsCollectionModifiedEvent { + (event: Event, ui: ColumnsCollectionModifiedEventUIParam): void; +} + +interface ColumnsCollectionModifiedEventUIParam { +} + +interface RequestErrorEvent { + (event: Event, ui: RequestErrorEventUIParam): void; +} + +interface RequestErrorEventUIParam { +} + +interface CreatedEvent { + (event: Event, ui: CreatedEventUIParam): void; +} + +interface CreatedEventUIParam { +} + +interface DestroyedEvent { + (event: Event, ui: DestroyedEventUIParam): void; +} + +interface DestroyedEventUIParam { +} + +interface IgGrid { + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". + * "number" The widget width can be set in pixels as a number. Example values: 800, 700. + * "null" will stretch to fit the sum of the columns widths. + */ + 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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * 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. + */ + height?: string|number; + + /** + * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + */ + autoAdjustHeight?: boolean; + + /** + * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + * + * Valid values: + * "string" The avarage row height can be set in pixels ("25px"). + * "number" The avarage row height can be set in pixels as a number (25). + */ + avgRowHeight?: string|number; + + /** + * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + * + * Valid values: + * "string" The avarage column width can be set in pixels ("25px"). + * "number" The avarage column width can be set in pixels as a number (25). + */ + avgColumnWidth?: string|number; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * + * + * Valid values: + * "string" The default column width can be set in pixels ("100px"). + * "number" The default column width can be set in pixels as a number (100). + */ + defaultColumnWidth?: string|number; + + /** + * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * + */ + autoGenerateColumns?: boolean; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + */ + virtualization?: boolean; + + /** + * Determines row virtualization mode. + * + * + * Valid values: + * "fixed" Renders only the visible rows and/or columns in the grid. On scrolling the same rows and/or columns are updated with new data from the data source. Only fixed virtualization can work with column virtualization at the same time. Fixed virtualization is not supported by some grid features: Resizing, Group By, Responsive. + * "continuous" renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. + */ + virtualizationMode?: string; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + */ + rowVirtualization?: boolean; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * + */ + columnVirtualization?: boolean; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * + */ + virtualizationMouseWheelStep?: number; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + */ + adjustVirtualHeights?: boolean; + + /** + * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + * + * Valid values: + * "infragistics" The grid will use the Infragistics Templating engine to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. + * "jsRender" The grid will use jsRender to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. + */ + templatingEngine?: string; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + */ + columns?: IgGridColumn[]; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + * + * Valid values: + * "array" dataSource as an array + * "object" ddataSource as an object + * "string" dataSource as a string + */ + dataSource?: Array|Object|string; + + /** + * Specifies a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * + */ + dataSourceType?: string; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + */ + responseDataKey?: string; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + */ + responseTotalRecCountKey?: string; + + /** + * Specifies the HTTP verb to be used to issue the requests to a remote data source. + * + */ + requestType?: string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + responseContentType?: string; + + /** + * Controls the visibility of the grid header. + * + */ + showHeader?: boolean; + + /** + * Controls the visibility of the grid footer. + * + */ + showFooter?: boolean; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + */ + fixedHeaders?: boolean; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + */ + fixedFooters?: boolean; + + /** + * Caption text that will be shown above the grid header. + * + */ + caption?: string; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + */ + features?: IgGridFeature[]; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + */ + tabIndex?: number; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * + */ + localSchemaTransform?: boolean; + + /** + * Key of the column containing unique identifiers for the data records. + * + */ + primaryKey?: string; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + */ + serializeTransactionLog?: boolean; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + */ + autoCommit?: 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * + */ + aggregateTransactions?: boolean; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * Valid values: + * "date" formats only Date columns + * "number" formats only number columns + * "dateandnumber" formats both Date and number columns + * "true" formats Date and number columns + * "false" auto formatting is disabled + */ + autoFormat?: string|boolean; + + /** + * Gets sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * + */ + renderCheckboxes?: boolean; + + /** + * URL to which updating requests will be made. + * + */ + updateUrl?: string; + + /** + * Settings related to REST compliant update routines. + * + */ + restSettings?: IgGridRestSettings; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + */ + alternateRowStyles?: boolean; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + */ + autofitLastColumn?: boolean; + + /** + * Enables/disables rendering of hover styles 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; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + */ + enableUTCDates?: boolean; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + */ + mergeUnboundColumns?: boolean; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + */ + jsonpRequest?: boolean; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + */ + enableResizeContainerCheck?: boolean; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + * + * Valid values: + * "none" Always hide the feature chooser icon; The feature chooser is shown on tapping/clicking the column header. + * "desktopOnly" Always show the icon on desktop but hide when touch device detected. + * "always" Always show it in any environment. Chooser is shown when tapping the gear icon or column header. + */ + featureChooserIconDisplay?: string; + + /** + * Settings related to content scrolling. + * + */ + scrollSettings?: IgGridScrollSettings; + + /** + * Event fired when a cell is clicked. + */ + cellClick?: CellClickEvent; + + /** + * Event fired when a cell is right clicked. + */ + cellRightClick?: CellRightClickEvent; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + */ + dataBinding?: DataBindingEvent; + + /** + * Event fired after data binding is complete. + */ + dataBound?: DataBoundEvent; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + */ + rendering?: RenderingEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + */ + rendered?: RenderedEvent; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + */ + dataRendering?: DataRenderingEvent; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + */ + dataRendered?: DataRenderedEvent; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + */ + headerRendering?: HeaderRenderingEvent; + + /** + * Event fired after the header has been rendered. + */ + headerRendered?: HeaderRenderedEvent; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + */ + captionRendering?: CaptionRenderingEvent; + + /** + * Event fired after the caption has been rendered. + */ + captionRendered?: CaptionRenderedEvent; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + */ + footerRendering?: FooterRenderingEvent; + + /** + * Event fired after the footer has been rendered. + */ + footerRendered?: FooterRenderedEvent; + + /** + * Event fired after every TH in the grid header has been rendered. + */ + headerCellRendered?: HeaderCellRenderedEvent; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + */ + rowsRendering?: RowsRenderingEvent; + + /** + * Event fired after data rows are rendered. + */ + rowsRendered?: RowsRenderedEvent; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + */ + schemaGenerated?: SchemaGeneratedEvent; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + */ + columnsCollectionModified?: ColumnsCollectionModifiedEvent; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + */ + requestError?: RequestErrorEvent; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + */ + created?: CreatedEvent; + + /** + * Fired when the grid is destroyed + */ + destroyed?: DestroyedEvent; + + /** + * Option for igGrid + */ + [optionName: string]: any; +} +interface IgGridMethods { + /** + * Returns the element holding the data records + */ + widget(): void; + + /** + * Returns whether grid has non-data fixed columns(e.g. row selectors column) + */ + hasFixedDataSkippedColumns(): boolean; + + /** + * Returns true if grid has at least one fixed columns(even if a non-data column - like row-selectors column) + */ + hasFixedColumns(): boolean; + + /** + * Returns the current fixing direction. NOTE - use only if ColumnFixing feature is enabled + * @return left|right + */ + fixingDirection(): string; + + /** + * Returns whether the column with identifier colKey is fixed + * + * @param colKey An identifier of the column which should be checked. It can be a key or visible index. + */ + isFixedColumn(colKey: Object): boolean; + + /** + * Called to detect whether grid container is resized. When autoAdjustHeight is true and height of the grid is changed then the height of grid is re-set. + */ + resizeContainer(): void; + + /** + * Returns whether the header identified by colKey is multicolumn header(has children) + * + * @param colKey value of the column key + */ + isGroupHeader(colKey: string): Object; + + /** + * Returns an object that contains information on the passed Dom element + * + * rowId - the id of the record associated with the element - if primaryKey is not set this will be null. + * rowIndex - the index (in the DOM) of the row associated with the element. + * recordIndex - index of the data record associated with this element in the current dataView. + * columnObject - the column object associated with this element ( if the element is tr this will be null) + * + * @param elem The Dom element or jQuery object which can be a TD or TR element from the grid. + */ + getElementInfo(elem: Element): Object; + + /** + * Returns the ID of the TABLE element where data records are rendered + */ + id(): string; + + /** + * Returns the DIV that is the topmost container of the grid widget + */ + container(): Element; + + /** + * Returns the table that contains the header cells + */ + headersTable(): Element; + + /** + * Returns the table that contains the footer cells + */ + footersTable(): Element; + + /** + * Returns the DIV that is used as a scroll container for the grid contents + */ + scrollContainer(): Element; + + /** + * Returns the DIV that is the topmost container of the fixed grid - contains fixed columns(in ColumnFixing scenario) + */ + fixedContainer(): Element; + + /** + * Returns the DIV that is the topmost container of the fixed body grid - contains fixed columns(in ColumnFixing scenario) + */ + fixedBodyContainer(): Element; + + /** + * Returns container(jQuery representation) containing fixed footer - contains fixed columns(in ColumnFixing scenario) + */ + fixedFooterContainer(): Object; + + /** + * Returns container(jQuery representation) containing fixed header - contains fixed columns(in ColumnFixing scenario) + */ + fixedHeaderContainer(): Object; + + /** + * Returns the table that contains the FIXED header cells - contains fixed columns(in ColumnFixing scenario) + */ + fixedHeadersTable(): Element; + + /** + * Returns the table that contains the footer cells - contains fixed columns(in ColumnFixing scenario) + */ + fixedFootersTable(): Element; + + /** + * Returns the cell TD element at the specified location + * + * @param x The column index. + * @param y The row index. + * @param isFixed Optional parameter - if true get cell TD at the specified location from the fixed table + */ + cellAt(x: number, y: number, isFixed: boolean): Element; + + /** + * Returns the cell TD element by row id and column key + * + * @param rowId The id of the row. + * @param columnKey The column key. + */ + cellById(rowId: Object, columnKey: string): Element; + + /** + * Returns the fixed table - contains fixed columns(in ColumnFixing scenario). If there aren't fixed columns returns the grid table + */ + fixedTable(): Object; + + /** + * Gets all immediate children of the current grid + */ + immediateChildrenWidgets(): any[]; + + /** + * Gets all children of the current grid, recursively + */ + childrenWidgets(): any[]; + + /** + * Gets all children's elements of the current grid, recursively + */ + children(): any[]; + + /** + * Gets all immediate children's elements of the current grid + */ + immediateChildren(): any[]; + + /** + * Returns the row (TR element) at the specified index. jQuery selectors aren't used for performance reasons + * + * @param i The row index. + */ + rowAt(i: number): Element; + + /** + * Returns the row TR element by row id + * + * @param rowId The id of the row. + * @param isFixed Specify search in the fixed container. + */ + rowById(rowId: Object, isFixed?: boolean): Element; + + /** + * Returns the fixed row (TR element) at the specified index. jQuery selectors aren't used for performance reasons(in ColumnFixing scenario - only when there is at least one fixed column) + * + * @param i The row index. + */ + fixedRowAt(i: number): Element; + + /** + * Returns a list of all fixed TR elements holding data in the grid(in ColumnFixing scenario - only when there is at least one fixed column) + */ + fixedRows(): any[]; + + /** + * Returns a list of all TR elements holding data in the grid(when there is at least one fixed column returns rows only in the UNFIXED table) + */ + rows(): any[]; + + /** + * Returns all data fixed rows recursively, not only the immediate ones(in ColumnFixing scenario - only when there is at least one fixed column) + */ + allFixedRows(): any[]; + + /** + * Returns all data rows recursively, not only the immediate ones(when there is at least one fixed column returns rows only in the UNFIXED table) + */ + allRows(): any[]; + + /** + * Returns a column object by the specified column key + * + * @param key The column key. + */ + columnByKey(key: string): Object; + + /** + * Returns a column object by the specified header text. If there are multiple matches, returns the first one. + * + * @param text The column header text. + */ + columnByText(text: string): Object; + + /** + * 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; + + /** + * Retrieves a cell value using the row index and the column key. If a primaryKey is defined, rowId is assumed to be the row Key (not index). + * If primary key is not defined, then rowId is converted to a number and is used as a row index. + * + * @param rowId Row index or row key (primary key). + * @param colKey The column key. + */ + getCellValue(rowId: Object, colKey: string): Object; + + /** + * Returns the cell text. If colKey is a number, the index of the column is used (instead of a column name)- does not apply when using a Multi-Row Layout grid. + * This is the actual text (or HTML string) for the contents of the cell. + * + * @param rowId Row index or row data key (primary key) + * @param colKey Column key. + */ + getCellText(rowId: Object, colKey: string): string; + + /** + * Sets a new template for a column after initialization and renders the grid if not explicitly disabled. This method will replace any existing explicitly set row template and will build one anew from the column ones. + * + * @param col An identifier of the column to set template for (index or key) + * @param tmpl The column template to set + * @param render Should the grid rerender after template is set + */ + setColumnTemplate(col: Object, tmpl: string, render?: boolean): void; + + /** + * Commits all pending transactions to the client data source. Note that there won't be anything to commit on the UI, since it is updated instantly. In order to rollback the actual UI, a call to dataBind() is required. + * + * @param rowId If specified, will commit only that transaction corresponding to the specified record key. + */ + commit(rowId?: Object): 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 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[]; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings). + * That is a wrapper for this.dataSource.findRecordByKey(key). + * + * @param key Primary key of the record + */ + findRecordByKey(key: Object): Object; + + /** + * Returns a standalone object (copy) that represents the committed transactions, but detached from the data source. + * That is a wrapper for this.dataSource.getDetachedRecord(t). + * + * @param t A transaction object. + */ + getDetachedRecord(t: Object): Object; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source. + * That is a wrapper for this.dataSource.pendingTransactions(). + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + * That is a wrapper for this.dataSource.allTransactions(). + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently. + * That is a wrapper for this.dataSource.transactionsAsString(). + */ + transactionsAsString(): string; + + /** + * Invokes an AJAX request to the updateUrl option (if specified) and passes the serialized transaction log (a serialized JSON string) as part of the POST request. + * + * @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; + + /** + * Adds a new row (TR) to the grid, by taking a data row object. Assumes the record will have the primary key. + * + * @param rec Identifier/key of row. If missing, then number of rows in grid is used. + */ + renderNewRow(rec?: string): void; + + /** + * If the data source points to a local JSON array of data, and it is necessary to reset it at runtime, it must be done through this API member instead of the options (options.dataSource) + * + * @param dataSource New data source object. + */ + dataSourceObject(dataSource: Object): void; + + /** + * Returns the total number of records in the underlying backend. If paging or filtering is enabled, this may differ from the number of records in the client-side data source. + * In order for this to work, the response JSON/XML must include a property that specifies the total number of records, which name is specified by options.responseTotalRecCountKey. + * This functionality is completely delegated to the data source control. + */ + totalRecordsCount(): number; + + /** + * Causes the grid to data bind to the data source (local or remote) , and re-render all of the data as well + * + * @param internal + */ + dataBind(internal: Object): void; + + /** + * Moves a visible column at a specified place, in front or behind a target column or at a target index + * 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 of the column to be moved. It can be a key, a Multi-Column Header identificator, or an index in a number format. The latter is not supported when the grid contains multi-column headers. + * @param target An identifier of a column where the moved column should move to or an index at which the moved column should be moved to. In the case of a column identifier the column will be moved after it by default. + * @param after Specifies whether the column moved should be moved after or before the target column. This parameter is disregarded if there is no target column specified but a target index is used. + * @param inDom Specifies whether the column moving will be enacted through DOM manipulation or through rerendering of the grid. + * @param callback Specifies a custom function to be called when the column is moved. + */ + moveColumn(column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): 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. If a string is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when the column is shown(optional) + */ + showColumn(column: Object, 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 string is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when the column is hidden(optional) + */ + hideColumn(column: Object, callback: Function): void; + + /** + * Gets unbound values for the specified column key. If key is not specified returns all unboundvalues + * + * @param key column key + */ + getUnboundValues(key: string): Object; + + /** + * Sets unbound values for the unbound column with the specified key. If removeOldValues is true then values(if any) for the unbound columns are re-set with the new values + * + * @param key key of the unbound column + * @param values array of values to be set on unbound values + * @param removeOldValues if true removes current unbound values(if any) for the specified column and apply the new ones specified in parameter values. Otherwise merge current values with the specified in parameter values + */ + setUnboundValues(key: string, values: any[], removeOldValues: Object): void; + + /** + * Sets unbound value for the unbound cell by the specified column key and row primary key. + * + * @param col key of the unbound column + * @param rowId primary key value of the row + * @param val value to be set on unbound cell + * @param notToRender if false will re-render the row + */ + setUnboundValueByPK(col: string, rowId: string, val: Object, notToRender: Object): void; + + /** + * Returns an unbound column with the specified key. If not found returns null + * + * @param key a column key + */ + getUnboundColumnByKey(key: string): Object; + + /** + * Returns whether there is vertical scrollbar. Because of perfrormance issues in older Internet Explorer especially 8,9 - there is no need to check if height is not set - there is no scrollbar OR if row virtualization is enabled - it is supposed there is vertical scrollbar + */ + hasVerticalScrollbar(): Object; + + /** + * Auto resize columns that have property width set to "*" so content to be auto-fitted(not shrinked/cutted). Auto-resizing is applied ONLY for visible columns + */ + autoSizeColumns(): void; + + /** + * Calculates the width of the column so its content to be auto-fitted to the width of the data in it(the content should NOT be shrinked/cutted) + * + * @param columnIndex Visible column index + */ + calculateAutoFitColumnWidth(columnIndex: number): number; + + /** + * Get visible index by specified column key. If column is not found or is hidden then returns -1. + * Note: Method does not count column groups (Multi-Column Headers). + * + * @param columnKey columnKey + * @param includeDataSkip Optional parameter - if set to true include non data columns(like expander column, row selectors column, etc.) in calculations + */ + getVisibleIndexByKey(columnKey: string, includeDataSkip: boolean): number; + + /** + * When called the method re-renders the whole grid(also rebinds to the data source) and renders the cols object + * + * @param cols an array of column objects + */ + renderMultiColumnHeader(cols: any[]): void; + + /** + * Scroll to the specified row or specified position(in pixels) + * + * @param scrollerPosition An identifier of the vertical scroll position. When it is string then it is interpreted as pixels otherwise it is the row number + */ + virtualScrollTo(scrollerPosition: Object): void; + + /** + * Returns column object and visible index for the table cell(TD) which is passed as argument + * + * @param $td cell(TD) - either DOM TD element or jQuery object + */ + getColumnByTD($td: Object): 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. + * + * @param notToCallDestroy + */ + destroy(notToCallDestroy: Object): void; +} +interface JQuery { + data(propertyName: "igGrid"): IgGridMethods; +} + +interface JQuery { + igGrid(methodName: "widget"): void; + igGrid(methodName: "hasFixedDataSkippedColumns"): boolean; + igGrid(methodName: "hasFixedColumns"): boolean; + igGrid(methodName: "fixingDirection"): string; + igGrid(methodName: "isFixedColumn", colKey: Object): boolean; + igGrid(methodName: "resizeContainer"): void; + igGrid(methodName: "isGroupHeader", colKey: string): Object; + igGrid(methodName: "getElementInfo", elem: Element): Object; + igGrid(methodName: "id"): string; + igGrid(methodName: "container"): Element; + igGrid(methodName: "headersTable"): Element; + igGrid(methodName: "footersTable"): Element; + igGrid(methodName: "scrollContainer"): Element; + igGrid(methodName: "fixedContainer"): Element; + igGrid(methodName: "fixedBodyContainer"): Element; + igGrid(methodName: "fixedFooterContainer"): Object; + igGrid(methodName: "fixedHeaderContainer"): Object; + igGrid(methodName: "fixedHeadersTable"): Element; + igGrid(methodName: "fixedFootersTable"): Element; + igGrid(methodName: "cellAt", x: number, y: number, isFixed: boolean): Element; + igGrid(methodName: "cellById", rowId: Object, columnKey: string): Element; + igGrid(methodName: "fixedTable"): Object; + igGrid(methodName: "immediateChildrenWidgets"): any[]; + igGrid(methodName: "childrenWidgets"): any[]; + igGrid(methodName: "children"): any[]; + igGrid(methodName: "immediateChildren"): any[]; + igGrid(methodName: "rowAt", i: number): Element; + igGrid(methodName: "rowById", rowId: Object, isFixed?: boolean): Element; + igGrid(methodName: "fixedRowAt", i: number): Element; + igGrid(methodName: "fixedRows"): any[]; + igGrid(methodName: "rows"): any[]; + igGrid(methodName: "allFixedRows"): any[]; + igGrid(methodName: "allRows"): any[]; + igGrid(methodName: "columnByKey", key: string): Object; + igGrid(methodName: "columnByText", text: string): Object; + igGrid(methodName: "selectedCells"): any[]; + igGrid(methodName: "selectedRows"): any[]; + igGrid(methodName: "selectedCell"): Object; + igGrid(methodName: "selectedRow"): Object; + igGrid(methodName: "activeCell"): Object; + igGrid(methodName: "activeRow"): Object; + igGrid(methodName: "getCellValue", rowId: Object, colKey: string): Object; + igGrid(methodName: "getCellText", rowId: Object, colKey: string): string; + igGrid(methodName: "setColumnTemplate", col: Object, tmpl: string, render?: boolean): void; + igGrid(methodName: "commit", rowId?: Object): void; + igGrid(methodName: "rollback", rowId?: Object, updateUI?: boolean): any[]; + igGrid(methodName: "findRecordByKey", key: Object): Object; + igGrid(methodName: "getDetachedRecord", t: Object): Object; + igGrid(methodName: "pendingTransactions"): any[]; + igGrid(methodName: "allTransactions"): any[]; + igGrid(methodName: "transactionsAsString"): string; + igGrid(methodName: "saveChanges", success: Function, error: Function): void; + igGrid(methodName: "renderNewRow", rec?: string): void; + igGrid(methodName: "dataSourceObject", dataSource: Object): void; + igGrid(methodName: "totalRecordsCount"): number; + igGrid(methodName: "dataBind", internal: Object): void; + igGrid(methodName: "moveColumn", column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; + igGrid(methodName: "showColumn", column: Object, callback: Function): void; + igGrid(methodName: "hideColumn", column: Object, callback: Function): void; + igGrid(methodName: "getUnboundValues", key: string): Object; + igGrid(methodName: "setUnboundValues", key: string, values: any[], removeOldValues: Object): void; + igGrid(methodName: "setUnboundValueByPK", col: string, rowId: string, val: Object, notToRender: Object): void; + igGrid(methodName: "getUnboundColumnByKey", key: string): Object; + igGrid(methodName: "hasVerticalScrollbar"): Object; + igGrid(methodName: "autoSizeColumns"): void; + igGrid(methodName: "calculateAutoFitColumnWidth", columnIndex: number): number; + igGrid(methodName: "getVisibleIndexByKey", columnKey: string, includeDataSkip: boolean): number; + igGrid(methodName: "renderMultiColumnHeader", cols: any[]): void; + igGrid(methodName: "virtualScrollTo", scrollerPosition: Object): void; + igGrid(methodName: "getColumnByTD", $td: Object): Object; + igGrid(methodName: "destroy", notToCallDestroy: Object): void; + + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + */ + igGrid(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * @optionValue New value to be set. + */ + igGrid(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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + */ + igGrid(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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + */ + igGrid(optionLiteral: 'option', optionName: "autoAdjustHeight"): boolean; + + /** + * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "autoAdjustHeight", optionValue: boolean): void; + + /** + * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + */ + igGrid(optionLiteral: 'option', optionName: "avgRowHeight"): string|number; + + /** + * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "avgRowHeight", optionValue: string|number): void; + + /** + * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + */ + igGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): string|number; + + /** + * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "avgColumnWidth", optionValue: string|number): void; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * + */ + igGrid(optionLiteral: 'option', optionName: "defaultColumnWidth"): string|number; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "defaultColumnWidth", optionValue: string|number): void; + + /** + * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * + */ + igGrid(optionLiteral: 'option', optionName: "autoGenerateColumns"): boolean; + + /** + * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "autoGenerateColumns", optionValue: boolean): void; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + */ + igGrid(optionLiteral: 'option', optionName: "virtualization"): boolean; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; + + /** + * Determines row virtualization mode. + * + */ + igGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; + + /** + * Determines row virtualization mode. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "virtualizationMode", optionValue: string): void; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + */ + igGrid(optionLiteral: 'option', optionName: "rowVirtualization"): boolean; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "rowVirtualization", optionValue: boolean): void; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * + */ + igGrid(optionLiteral: 'option', optionName: "columnVirtualization"): boolean; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: boolean): void; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * + */ + igGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep"): number; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep", optionValue: number): void; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + */ + igGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights"): boolean; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights", optionValue: boolean): void; + + /** + * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + */ + igGrid(optionLiteral: 'option', optionName: "templatingEngine"): string; + + /** + * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "templatingEngine", optionValue: string): void; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + */ + igGrid(optionLiteral: 'option', optionName: "columns"): IgGridColumn[]; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "columns", optionValue: IgGridColumn[]): void; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + */ + igGrid(optionLiteral: 'option', optionName: "dataSource"): Array|Object|string; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: Array|Object|string): void; + + /** + * Gets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + */ + igGrid(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "dataSourceUrl", 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). + * + */ + igGrid(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). + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + */ + igGrid(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + */ + igGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * Gets the HTTP verb to be used to issue the requests to a remote data source. + * + */ + igGrid(optionLiteral: 'option', optionName: "requestType"): string; + + /** + * Sets the HTTP verb to be used to issue the requests to a remote data source. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + igGrid(optionLiteral: 'option', optionName: "responseContentType"): string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + + /** + * Controls the visibility of the grid header. + * + */ + igGrid(optionLiteral: 'option', optionName: "showHeader"): boolean; + + /** + * Controls the visibility of the grid header. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; + + /** + * Controls the visibility of the grid footer. + * + */ + igGrid(optionLiteral: 'option', optionName: "showFooter"): boolean; + + /** + * Controls the visibility of the grid footer. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + */ + igGrid(optionLiteral: 'option', optionName: "fixedHeaders"): boolean; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "fixedHeaders", optionValue: boolean): void; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + */ + igGrid(optionLiteral: 'option', optionName: "fixedFooters"): boolean; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "fixedFooters", optionValue: boolean): void; + + /** + * Caption text that will be shown above the grid header. + * + */ + igGrid(optionLiteral: 'option', optionName: "caption"): string; + + /** + * Caption text that will be shown above the grid header. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "caption", optionValue: string): void; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + */ + igGrid(optionLiteral: 'option', optionName: "features"): IgGridFeature[]; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "features", optionValue: IgGridFeature[]): void; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + */ + igGrid(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * + */ + igGrid(optionLiteral: 'option', optionName: "localSchemaTransform"): boolean; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "localSchemaTransform", optionValue: boolean): void; + + /** + * Key of the column containing unique identifiers for the data records. + * + */ + igGrid(optionLiteral: 'option', optionName: "primaryKey"): string; + + /** + * Key of the column containing unique identifiers for the data records. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "primaryKey", optionValue: string): void; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + */ + igGrid(optionLiteral: 'option', optionName: "serializeTransactionLog"): boolean; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "serializeTransactionLog", optionValue: boolean): void; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + */ + igGrid(optionLiteral: 'option', optionName: "autoCommit"): boolean; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "autoCommit", optionValue: boolean): void; + + /** + * 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * + */ + igGrid(optionLiteral: 'option', optionName: "aggregateTransactions"): 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "aggregateTransactions", optionValue: boolean): void; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + */ + igGrid(optionLiteral: 'option', optionName: "autoFormat"): string|boolean; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "autoFormat", optionValue: string|boolean): void; + + /** + * Gets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * + */ + igGrid(optionLiteral: 'option', optionName: "renderCheckboxes"): boolean; + + /** + * Sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "renderCheckboxes", optionValue: boolean): void; + + /** + * URL to which updating requests will be made. + * + */ + igGrid(optionLiteral: 'option', optionName: "updateUrl"): string; + + /** + * URL to which updating requests will be made. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; + + /** + * Settings related to REST compliant update routines. + * + */ + igGrid(optionLiteral: 'option', optionName: "restSettings"): IgGridRestSettings; + + /** + * Settings related to REST compliant update routines. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: IgGridRestSettings): void; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + */ + igGrid(optionLiteral: 'option', optionName: "alternateRowStyles"): boolean; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "alternateRowStyles", optionValue: boolean): void; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + */ + igGrid(optionLiteral: 'option', optionName: "autofitLastColumn"): boolean; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "autofitLastColumn", optionValue: boolean): void; + + /** + * Enables/disables rendering of hover styles 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. + * + */ + igGrid(optionLiteral: 'option', optionName: "enableHoverStyles"): boolean; + + /** + * Enables/disables rendering of hover styles 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. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "enableHoverStyles", optionValue: boolean): void; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + */ + igGrid(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + */ + igGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns"): boolean; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns", optionValue: boolean): void; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + */ + igGrid(optionLiteral: 'option', optionName: "jsonpRequest"): boolean; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "jsonpRequest", optionValue: boolean): void; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + */ + igGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck"): boolean; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck", optionValue: boolean): void; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + */ + igGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay"): string; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay", optionValue: string): void; + + /** + * Settings related to content scrolling. + * + */ + igGrid(optionLiteral: 'option', optionName: "scrollSettings"): IgGridScrollSettings; + + /** + * Settings related to content scrolling. + * + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "scrollSettings", optionValue: IgGridScrollSettings): void; + + /** + * Event fired when a cell is clicked. + */ + igGrid(optionLiteral: 'option', optionName: "cellClick"): CellClickEvent; + + /** + * Event fired when a cell is clicked. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "cellClick", optionValue: CellClickEvent): void; + + /** + * Event fired when a cell is right clicked. + */ + igGrid(optionLiteral: 'option', optionName: "cellRightClick"): CellRightClickEvent; + + /** + * Event fired when a cell is right clicked. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "cellRightClick", optionValue: CellRightClickEvent): void; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + */ + igGrid(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event fired after data binding is complete. + */ + igGrid(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event fired after data binding is complete. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + */ + igGrid(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + */ + igGrid(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + */ + igGrid(optionLiteral: 'option', optionName: "dataRendering"): DataRenderingEvent; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "dataRendering", optionValue: DataRenderingEvent): void; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + */ + igGrid(optionLiteral: 'option', optionName: "dataRendered"): DataRenderedEvent; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "dataRendered", optionValue: DataRenderedEvent): void; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + */ + igGrid(optionLiteral: 'option', optionName: "headerRendering"): HeaderRenderingEvent; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "headerRendering", optionValue: HeaderRenderingEvent): void; + + /** + * Event fired after the header has been rendered. + */ + igGrid(optionLiteral: 'option', optionName: "headerRendered"): HeaderRenderedEvent; + + /** + * Event fired after the header has been rendered. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "headerRendered", optionValue: HeaderRenderedEvent): void; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + */ + igGrid(optionLiteral: 'option', optionName: "captionRendering"): CaptionRenderingEvent; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "captionRendering", optionValue: CaptionRenderingEvent): void; + + /** + * Event fired after the caption has been rendered. + */ + igGrid(optionLiteral: 'option', optionName: "captionRendered"): CaptionRenderedEvent; + + /** + * Event fired after the caption has been rendered. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "captionRendered", optionValue: CaptionRenderedEvent): void; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + */ + igGrid(optionLiteral: 'option', optionName: "footerRendering"): FooterRenderingEvent; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "footerRendering", optionValue: FooterRenderingEvent): void; + + /** + * Event fired after the footer has been rendered. + */ + igGrid(optionLiteral: 'option', optionName: "footerRendered"): FooterRenderedEvent; + + /** + * Event fired after the footer has been rendered. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "footerRendered", optionValue: FooterRenderedEvent): void; + + /** + * Event fired after every TH in the grid header has been rendered. + */ + igGrid(optionLiteral: 'option', optionName: "headerCellRendered"): HeaderCellRenderedEvent; + + /** + * Event fired after every TH in the grid header has been rendered. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "headerCellRendered", optionValue: HeaderCellRenderedEvent): void; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + */ + igGrid(optionLiteral: 'option', optionName: "rowsRendering"): RowsRenderingEvent; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "rowsRendering", optionValue: RowsRenderingEvent): void; + + /** + * Event fired after data rows are rendered. + */ + igGrid(optionLiteral: 'option', optionName: "rowsRendered"): RowsRenderedEvent; + + /** + * Event fired after data rows are rendered. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "rowsRendered", optionValue: RowsRenderedEvent): void; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + */ + igGrid(optionLiteral: 'option', optionName: "schemaGenerated"): SchemaGeneratedEvent; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "schemaGenerated", optionValue: SchemaGeneratedEvent): void; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + */ + igGrid(optionLiteral: 'option', optionName: "columnsCollectionModified"): ColumnsCollectionModifiedEvent; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "columnsCollectionModified", optionValue: ColumnsCollectionModifiedEvent): void; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + */ + igGrid(optionLiteral: 'option', optionName: "requestError"): RequestErrorEvent; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + * + * @optionValue Define event handler function. + */ + igGrid(optionLiteral: 'option', optionName: "requestError", optionValue: RequestErrorEvent): void; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + */ + igGrid(optionLiteral: 'option', optionName: "created"): CreatedEvent; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "created", optionValue: CreatedEvent): void; + + /** + * Fired when the grid is destroyed + */ + igGrid(optionLiteral: 'option', optionName: "destroyed"): DestroyedEvent; + + /** + * Fired when the grid is destroyed + * + * @optionValue New value to be set. + */ + igGrid(optionLiteral: 'option', optionName: "destroyed", optionValue: DestroyedEvent): void; + igGrid(options: IgGrid): JQuery; + igGrid(optionLiteral: 'option', optionName: string): any; + igGrid(optionLiteral: 'option', options: IgGrid): JQuery; + igGrid(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igGrid(methodName: string, ...methodParams: any[]): any; +} interface IgGridGroupByGroupedColumn { /** * Key of the column that's grouped @@ -38744,6 +45460,12 @@ interface IgGridGroupByColumnSettings { */ summaries?: IgGridGroupByColumnSettingsSummaries; + /** + * Enables/disables default summaries per group data island or specifies summaries that are applied to specific column no matter the group. + * + */ + groupSummaries?: any; + /** * Option for IgGridGroupByColumnSettings */ @@ -38755,40 +45477,6 @@ interface GroupedColumnsChangingEvent { } 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 { @@ -38796,35 +45484,6 @@ interface GroupedColumnsChangedEvent { } 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 { @@ -38832,25 +45491,6 @@ interface ModalDialogMovingEvent { } 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 { @@ -38858,15 +45498,6 @@ interface ModalDialogClosingEvent { } 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 { @@ -38874,15 +45505,6 @@ interface ModalDialogClosedEvent { } 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 { @@ -38890,15 +45512,6 @@ interface ModalDialogOpeningEvent { } 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 { @@ -38906,15 +45519,6 @@ interface ModalDialogOpenedEvent { } 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 { @@ -38922,15 +45526,6 @@ interface ModalDialogContentsRenderingEvent { } 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 { @@ -38938,15 +45533,6 @@ interface ModalDialogContentsRenderedEvent { } 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 { @@ -38954,30 +45540,6 @@ interface ModalDialogButtonApplyClickEvent { } 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 { @@ -38985,15 +45547,6 @@ interface ModalDialogButtonResetClickEvent { } 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 { @@ -39001,20 +45554,6 @@ interface ModalDialogGroupingColumnEvent { } 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 { @@ -39022,25 +45561,6 @@ interface ModalDialogGroupColumnEvent { } 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 { @@ -39048,20 +45568,6 @@ interface ModalDialogUngroupingColumnEvent { } 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 { @@ -39069,25 +45575,6 @@ interface ModalDialogUngroupColumnEvent { } 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 { @@ -39095,25 +45582,6 @@ interface ModalDialogSortGroupedColumnEvent { } 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 { @@ -39134,6 +45602,16 @@ interface IgGridGroupBy { */ initialExpand?: boolean; + /** + * Specifies when paging is applied and there is at least one grouped column which records should be included in page processing. + * + * + * Valid values: + * "allRecords" All records are included in page processing - data records and group-by metadata records + * "dataRecordsOnly" Only data records are included in page processing(metadata group-by records are ignored) + */ + pagingMode?: string; + /** * Text that will be shown in the GroupBy area when there are no grouped columns * @@ -39405,167 +45883,102 @@ interface IgGridGroupBy { */ inherit?: boolean; + /** + * Specifies default summaries that will appear when grouping by a column on the bottom of each group as a row.This option has a lower priority than the groupSummaries defined under columnSettings for each column. + * All default summaries are defined under $.ig.util.defaultSummaryMethods + * + * + */ + groupSummaries?: any; + + /** + * Specifies the groupSummaries postion inside each group. + * + * + * Valid values: + * "top" One summary row will be displayed at the top for each group + * "bottom" One summary row will be displayed at the bottom for each group + * "both" Two summary rows will be be display for each group. One on the top and one on the bottom. + */ + groupSummariesPosition?: string; + /** * 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; @@ -39711,6 +46124,20 @@ interface JQuery { */ igGridGroupBy(optionLiteral: 'option', optionName: "initialExpand", optionValue: boolean): void; + /** + * Gets when paging is applied and there is at least one grouped column which records should be included in page processing. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "pagingMode"): string; + + /** + * Sets when paging is applied and there is at least one grouped column which records should be included in page processing. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "pagingMode", optionValue: string): void; + /** * Text that will be shown in the GroupBy area when there are no grouped columns * @@ -40297,29 +46724,45 @@ interface JQuery { */ igGridGroupBy(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + /** + * Gets default summaries that will appear when grouping by a column on the bottom of each group as a row.This option has a lower priority than the groupSummaries defined under columnSettings for each column. + * All default summaries are defined under $.ig.util.defaultSummaryMethods + * + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupSummaries"): any; + + /** + * Sets default summaries that will appear when grouping by a column on the bottom of each group as a row.This option has a lower priority than the groupSummaries defined under columnSettings for each column. + * All default summaries are defined under $.ig.util.defaultSummaryMethods + * + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupSummaries", optionValue: any): void; + + /** + * Gets the groupSummaries postion inside each group. + * + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupSummariesPosition"): string; + + /** + * Sets the groupSummaries postion inside each group. + * + * + * @optionValue New value to be set. + */ + igGridGroupBy(optionLiteral: 'option', optionName: "groupSummariesPosition", optionValue: string): 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. */ @@ -40327,25 +46770,11 @@ interface JQuery { /** * 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. */ @@ -40353,23 +46782,11 @@ interface JQuery { /** * 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. */ @@ -40377,19 +46794,11 @@ interface JQuery { /** * 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. */ @@ -40397,19 +46806,11 @@ interface JQuery { /** * 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. */ @@ -40417,19 +46818,11 @@ interface JQuery { /** * 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. */ @@ -40437,19 +46830,11 @@ interface JQuery { /** * 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. */ @@ -40457,19 +46842,11 @@ interface JQuery { /** * 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. */ @@ -40477,19 +46854,11 @@ interface JQuery { /** * 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. */ @@ -40497,25 +46866,11 @@ interface JQuery { /** * 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. */ @@ -40523,19 +46878,11 @@ interface JQuery { /** * 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. */ @@ -40543,21 +46890,11 @@ interface JQuery { /** * 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. */ @@ -40565,23 +46902,11 @@ interface JQuery { /** * 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. */ @@ -40589,21 +46914,11 @@ interface JQuery { /** * 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. */ @@ -40611,23 +46926,11 @@ interface JQuery { /** * 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. */ @@ -40635,23 +46938,11 @@ interface JQuery { /** * 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. */ @@ -40698,20 +46989,6 @@ interface ColumnHidingEvent { } 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 { @@ -40719,11 +46996,6 @@ interface ColumnHidingRefusedEvent { } interface ColumnHidingRefusedEventUIParam { - /** - * Used to get the reference to the GridHiding widget. - */ - owner?: any; - columnKeys?: any; } interface ColumnShowingRefusedEvent { @@ -40731,11 +47003,6 @@ interface ColumnShowingRefusedEvent { } interface ColumnShowingRefusedEventUIParam { - /** - * Used to get the reference to the GridHiding widget. - */ - owner?: any; - columnKeys?: any; } interface MultiColumnHidingEvent { @@ -40743,15 +47010,6 @@ interface MultiColumnHidingEvent { } 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 { @@ -40759,20 +47017,6 @@ interface ColumnHiddenEvent { } 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 { @@ -40780,20 +47024,6 @@ interface ColumnShowingEvent { } 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 { @@ -40801,20 +47031,6 @@ interface ColumnShownEvent { } 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 { @@ -40822,15 +47038,6 @@ interface ColumnChooserOpeningEvent { } 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 { @@ -40838,15 +47045,6 @@ interface ColumnChooserOpenedEvent { } 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 { @@ -40854,25 +47052,6 @@ interface ColumnChooserMovingEvent { } 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 { @@ -40880,15 +47059,6 @@ interface ColumnChooserClosingEvent { } 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 { @@ -40896,15 +47066,6 @@ interface ColumnChooserClosedEvent { } 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 { @@ -40912,15 +47073,6 @@ interface ColumnChooserContentsRenderingEvent { } 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 { @@ -40928,15 +47080,6 @@ interface ColumnChooserContentsRenderedEvent { } 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 { @@ -40944,25 +47087,6 @@ interface ColumnChooserButtonApplyClickEvent { } 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 { @@ -40970,15 +47094,6 @@ interface ColumnChooserButtonResetClickEvent { } 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 { @@ -41100,153 +47215,81 @@ interface IgGridHiding { /** * 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; @@ -41618,21 +47661,11 @@ interface JQuery { /** * 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. */ @@ -41640,19 +47673,11 @@ interface JQuery { /** * 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. */ @@ -41660,19 +47685,11 @@ interface JQuery { /** * 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. */ @@ -41680,19 +47697,11 @@ interface JQuery { /** * 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. */ @@ -41700,21 +47709,11 @@ interface JQuery { /** * 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. */ @@ -41722,21 +47721,11 @@ interface JQuery { /** * 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. */ @@ -41744,21 +47733,11 @@ interface JQuery { /** * 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. */ @@ -41766,19 +47745,11 @@ interface JQuery { /** * 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. */ @@ -41786,19 +47757,11 @@ interface JQuery { /** * 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. */ @@ -41806,23 +47769,11 @@ interface JQuery { /** * 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. */ @@ -41830,19 +47781,11 @@ interface JQuery { /** * 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. */ @@ -41850,19 +47793,11 @@ interface JQuery { /** * 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. */ @@ -41870,19 +47805,11 @@ interface JQuery { /** * 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. */ @@ -41890,19 +47817,11 @@ interface JQuery { /** * 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. */ @@ -41910,23 +47829,11 @@ interface JQuery { /** * 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. */ @@ -41934,19 +47841,11 @@ interface JQuery { /** * 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. */ @@ -41979,20 +47878,390 @@ interface IgHierarchicalGridColumnLayout { [optionName: string]: any; } +interface IgHierarchicalGridColumnGroupOptions { + /** + * Sets whether the group is expanded or collapsed. Applied only if the allowGroupCollapsing is set to true. + * + */ + expanded?: boolean; + + /** + * Sets whether expansion indicators are visible in the group header. + * + */ + allowGroupCollapsing?: boolean; + + /** + * Sets when should the group be hidden. Applied only if the allowGroupCollapsing is set to true. + * + * + * Valid values: + * "never" never hide the group + * "always" always hide the group + * "parentcollapsed" hide the group when its parent group is collapsed + * "parentexpanded" hide the group when its parent group is expanded + */ + hidden?: string; + + /** + * Option for IgHierarchicalGridColumnGroupOptions + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridColumn { + /** + * Header text for the specified column. + * + */ + headerText?: string; + + /** + * The property in the data source to which the column is bound. Also used to identify the column by, and find specific columns with API methods such as [columnByKey](ui.ighierarchicalgrid#methods:columnByKey). + * + */ + key?: string; + + /** + * Reference to a function (string or function) which will be used for formatting the cell values. The function should accept a value and return the new formatted value. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * Valid values: + * "string" The name of the function which will be used for formatting the cell values. + * "function" Function which will be used for formatting the cell values. The function should accept a value and return the new formatted value. + */ + formatter?: string|Function; + + /** + * Gets/Sets the type of formatting for cells of the column. Default value is null. Checkout [Formatting Dates, Numbers and Strings](http://www.igniteui.com/help/formatting-dates-numbers-and-strings) for details on the valid formatting specifiers. + * + * If dataType is "date", then supported formats are following: "date", "dateLong", "dateTime", "time", "timeLong", "MM/dd/yyyy", "MMM-d, yy, h:mm:ss tt", "dddd d MMM", etc. + * If dataType is "number", then supported numeric formats are following: "number", "currency", "percent", "int", "double", "0.00", "#.0####", "0", "#.#######", etc. + * The value of "double" will be similar to "number", but with unlimited maximum number of decimal places. + * The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. + * If dataType is "string" or not set, then format is rendered as it is with replacement of possible "{0}" flag by value in cell. Example, if format is set to "Name: {0}" and value in cell is "Bob", then value will appear as "Name: Bob" + * If value is set to "checkbox", then checkboxes are used regardless of renderCheckboxes option of the grid. That has effect only when dataType option of column is set to "bool". + */ + format?: string; + + /** + * Data type of the column cell values: string, number, bool, date, object. + * + */ + dataType?: string|number|boolean|Date|Object; + + /** + * Width of the column in pixels or percentage. Can also be set as '*', in which case the width auto-size based on the content of the column cells (including the header text).If width is not defined and [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) is set, it is assumed for all columns. + * + * + * + * Valid values: + * "string" The column width can be set in pixels (px), percentage (%) or as '*' in order to auto-size based on the cells and header content. + * "number" The column width can be set as a number + */ + width?: string|number; + + /** + * Initial visibility of the column. A column can be hidden without the Hiding feature being enabled but there will be no UI for unhiding it. Columns can be defined as hidden in the options of the Hiding feature as well and those definitions take precedence. + * + */ + hidden?: boolean; + + /** + * Sets a template for an individual column. the contents of the template should be the HTML markup that goes inside the table cell, or the entire table cell markup. [Here's an example of creating a basic column template](http://www.igniteui.com/help/creating-a-basic-column-template-in-the-iggrid) + * + */ + template?: string; + + /** + * Sets whether column data is derived from the datasource. If set to true, then the cells in this column are not bound to the data source. The data in this column is populated using [formula](ui.ighierarchicalgrid#options:columns.formula), or using [unboundValues](ui.ighierarchicalgrid#options:columns.unboundValues), or through the [setUnboundValues](ui.ighierarchicalgrid#methods:setUnboundValues) API method. [Here's an overview of the unbound columns feature](http://www.igniteui.com/help/iggrid-unboundcolumns-overview) + * + */ + unbound?: boolean; + + /** + * Options used to configure collapsible column [groups](ui.ighierarchicalgrid#options:columns.group). + * + */ + groupOptions?: IgHierarchicalGridColumnGroupOptions; + + /** + * Array of child column definitions. If the column has the property group than the grid has multi column headers. + * + */ + group?: any[]; + + /** + * Determines the way in which dates will be displayed in the grid for this column. + * + * + * Valid values: + * "local" The dates for this column will be rendered in the client's local timezone. + * "utc" The dates for this column will be rendered in their UTC representation. + */ + dateDisplayType?: string; + + /** + * This option has been deprecated as of the June 2016 service release. + * Adjust span of multi column header cell. Use option rowSpan. + */ + rowspan?: number; + + /** + * A reference to or the name of a JavaScript function, which will calculate the value of the current cell based on other cell values in the same row. Used with [unbound columns](ui.ighierarchicalgrid#options:columns.unbound). + * + * + * Valid values: + * "string" The name of the JavaScript function. + * "function" Reference to the JavaScript function. + */ + formula?: string|Function; + + /** + * Array of values which will be populated in the column cells at initialization, if the column is [unbound](ui.ighierarchicalgrid#options:columns.unbound). + * + */ + unboundValues?: any[]; + + /** + * Space-separated list of CSS classes to be applied on the header cell of this column. + * + */ + headerCssClass?: string; + + /** + * Space-separated list of CSS classes to be applied on the data cells of this column. The class is not applied if the column has a column [template](ui.ighierarchicalgrid#options:columns.template) defined, which contains full definition in the template. + * + */ + columnCssClass?: string; + + /** + * This option is applicable only for columns with [dataType](ui.ighierarchicalgrid#options:columns.dataType) of object. Reference to a function, or the name of the function, that will be used for complex data extraction from the data records, whose return value will be used for all data operations associated with this column and will be displayed as cell value. [Here you can find more examples of how to setup a column mapper](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-mapper) + * + * + * Valid values: + * "string" The name of the mapper function. + * "function" Reference to the mapper function. + */ + mapper?: string|Function; + + /** + * Specifies the row index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + rowIndex?: number; + + /** + * Specifies the column index of the cell in a Multi-Row Layout configuration. All columns must have this property set for the multi-row-layout mode to be enabled. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + columnIndex?: number; + + /** + * Specifies the navigation index of the cell for the TAB sequence when the cells are in edit mode in a Multi-Row Layout grid. Has no effect otherwise. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + navigationIndex?: number; + + /** + * Specifies the colSpan of the cell in a Multi-Row Layout configuration. colSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout) + * + */ + colSpan?: number; + + /** + * Specifies the rowSpan of the cell in a Multi-Row Layout configuration. rowSpan 0 is not supported and will be changed to 1 by the grid. [Here you can find more about the Multi-Row Layout feature](http://www.igniteui.com/help/iggrid-multirowlayout). If multi-row-layout is not used but multi-column-header is set then this option is used to adjust span of header cell. + * + */ + rowSpan?: number; + + /** + * Option for IgHierarchicalGridColumn + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridFeature { + /** + * Name of the feature to be enabled. + */ + name?: string; + + /** + * Option for IgHierarchicalGridFeature + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridRestSettingsCreate { + /** + * 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 IgHierarchicalGridRestSettingsCreate + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridRestSettingsUpdate { + /** + * 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 IgHierarchicalGridRestSettingsUpdate + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridRestSettingsRemove { + /** + * 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 IgHierarchicalGridRestSettingsRemove + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridRestSettings { + /** + * Settings for create requests + * + */ + create?: IgHierarchicalGridRestSettingsCreate; + + /** + * Settings for update requests + */ + update?: IgHierarchicalGridRestSettingsUpdate; + + /** + * Settings for remove requests + */ + remove?: IgHierarchicalGridRestSettingsRemove; + + /** + * 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. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + contentType?: string; + + /** + * Option for IgHierarchicalGridRestSettings + */ + [optionName: string]: any; +} + +interface IgHierarchicalGridScrollSettings { + /** + * Sets gets current vertical position. + * + */ + scrollTop?: number; + + /** + * Sets gets current horizontal position. + * + */ + scrollLeft?: number; + + /** + * Sets gets the step of the default scrolling behavior when using the mouse wheel. + * + */ + wheelStep?: number; + + /** + * Sets gets if smoother scrolling with small intertia should be used when using the 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](ui.ighierarchicalgrid#options:scrollSettings.smoothing). + * + */ + 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](ui.ighierarchicalgrid#options:scrollSettings.smoothing). + * + */ + smoothingDuration?: number; + + /** + * Sets gets the modifier for how much the inertia scrolls on touch devices. Note: Value set to 0 would disable touch movements. Value set to -1 would invert them. + * + */ + inertiaStep?: number; + + /** + * Sets gets the modifier for how long the inertia last on touch devices. + * + */ + inertiaDuration?: number; + + /** + * Option for IgHierarchicalGridScrollSettings + */ + [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 { @@ -42000,15 +48269,6 @@ interface RowExpandedEvent { } 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 { @@ -42016,15 +48276,6 @@ interface RowCollapsingEvent { } 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 { @@ -42032,15 +48283,6 @@ interface RowCollapsedEvent { } 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 { @@ -42048,20 +48290,6 @@ interface ChildrenPopulatingEvent { } 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 { @@ -42069,20 +48297,6 @@ interface ChildrenPopulatedEvent { } 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 { @@ -42090,20 +48304,6 @@ interface ChildGridRenderedEvent { } 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 { @@ -42123,130 +48323,453 @@ 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[]; + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". + * "number" The widget width can be set in pixels as a number. Example values: 800, 700. + * "null" will stretch to fit the sum of the columns widths. + */ + 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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * 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. + */ + height?: string|number; + + /** + * If autoAdjustHeight is set to false, the [height](ui.ighierarchicalgrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.ighierarchicalgrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + */ + autoAdjustHeight?: boolean; + + /** + * Used for [row virtualization](ui.ighierarchicalgrid#options:rowVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + * + * Valid values: + * "string" The avarage row height can be set in pixels ("25px"). + * "number" The avarage row height can be set in pixels as a number (25). + */ + avgRowHeight?: string|number; + + /** + * Used for [column virtualization](ui.ighierarchicalgrid#options:columnVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + * + * Valid values: + * "string" The avarage column width can be set in pixels ("25px"). + * "number" The avarage column width can be set in pixels as a number (25). + */ + avgColumnWidth?: string|number; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.ighierarchicalgrid#options:columns.width) defined. + * + * + * Valid values: + * "string" The default column width can be set in pixels ("100px"). + * "number" The default column width can be set in pixels as a number (100). + */ + defaultColumnWidth?: string|number; + + /** + * If no [columns](ui.ighierarchicalgrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.ighierarchicalgrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.ighierarchicalgrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.ighierarchicalgrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) as well. + * + */ + autoGenerateColumns?: boolean; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + */ + virtualization?: boolean; + + /** + * Determines row virtualization mode. + * + * + * Valid values: + * "fixed" Renders only the visible rows and/or columns in the grid. On scrolling the same rows and/or columns are updated with new data from the data source. Only fixed virtualization can work with column virtualization at the same time. Fixed virtualization is not supported by some grid features: Resizing, Group By, Responsive. + * "continuous" renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. + */ + virtualizationMode?: string; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + */ + rowVirtualization?: boolean; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.ighierarchicalgrid#options:virtualization) to true and [virtualizationMode](ui.ighierarchicalgrid#options:virtualizationMode) to "fixed". + * + */ + columnVirtualization?: boolean; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight). + * + */ + virtualizationMouseWheelStep?: number; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + */ + adjustVirtualHeights?: boolean; + + /** + * The templating engine that will be used to render the grid [column templates](ui.ighierarchicalgrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + * + * Valid values: + * "infragistics" The grid will use the Infragistics Templating engine to render its [column templates](ui.ighierarchicalgrid#options:columns.template) and specific parts of the UI. + * "jsRender" The grid will use jsRender to render its [column templates](ui.ighierarchicalgrid#options:columns.template) and specific parts of the UI. + */ + templatingEngine?: string; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + */ + columns?: IgHierarchicalGridColumn[]; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + */ + dataSource?: any; + + /** + * Specifies a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * + */ + dataSourceType?: string; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + */ + responseDataKey?: string; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + */ + responseTotalRecCountKey?: string; + + /** + * Specifies the HTTP verb to be used to issue the requests to a remote data source. + * + */ + requestType?: string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + responseContentType?: string; + + /** + * Controls the visibility of the grid header. + * + */ + showHeader?: boolean; + + /** + * Controls the visibility of the grid footer. + * + */ + showFooter?: boolean; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + */ + fixedHeaders?: boolean; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + */ + fixedFooters?: boolean; + + /** + * Caption text that will be shown above the grid header. + * + */ + caption?: string; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + */ + features?: IgHierarchicalGridFeature[]; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + */ + tabIndex?: number; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.ighierarchicalgrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.ighierarchicalgrid#options:columns) defined will be extracted in a new object and used. + * + */ + localSchemaTransform?: boolean; + + /** + * Key of the column containing unique identifiers for the data records. + * + */ + primaryKey?: string; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + */ + serializeTransactionLog?: boolean; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.ighierarchicalgrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + */ + autoCommit?: 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.ighierarchicalgrid#options:autoCommit) is set to false. + * + */ + aggregateTransactions?: boolean; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * Valid values: + * "date" formats only Date columns + * "number" formats only number columns + * "dateandnumber" formats both Date and number columns + * "true" formats Date and number columns + * "false" auto formatting is disabled + */ + autoFormat?: string|boolean; + + /** + * Gets sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.ighierarchicalgrid#options:columns.template). + * + */ + renderCheckboxes?: boolean; + + /** + * URL to which updating requests will be made. + * + */ + updateUrl?: string; + + /** + * Settings related to REST compliant update routines. + * + */ + restSettings?: IgHierarchicalGridRestSettings; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + */ + alternateRowStyles?: boolean; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + */ + autofitLastColumn?: boolean; + + /** + * Enables/disables rendering of hover styles 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; + + /** + * Nables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + */ + enableUTCDates?: boolean; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + */ + mergeUnboundColumns?: boolean; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + */ + jsonpRequest?: boolean; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.ighierarchicalgrid#options:width) and/or [height](ui.ighierarchicalgrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + */ + enableResizeContainerCheck?: boolean; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + * + * Valid values: + * "none" Always hide the feature chooser icon; The feature chooser is shown on tapping/clicking the column header. + * "desktopOnly" Always show the icon on desktop but hide when touch device detected. + * "always" Always show it in any environment. Chooser is shown when tapping the gear icon or column header. + */ + featureChooserIconDisplay?: string; + + /** + * Settings related to content scrolling. + * + */ + scrollSettings?: IgHierarchicalGridScrollSettings; + /** * 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; @@ -42260,6 +48783,134 @@ interface IgHierarchicalGrid { */ childGridCreated?: ChildGridCreatedEvent; + /** + * Event fired when a cell is clicked. + */ + cellClick?: CellClickEvent; + + /** + * Event fired when a cell is right clicked. + */ + cellRightClick?: CellRightClickEvent; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + */ + dataBinding?: DataBindingEvent; + + /** + * Event fired after data binding is complete. + */ + dataBound?: DataBoundEvent; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + */ + rendering?: RenderingEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + */ + rendered?: RenderedEvent; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + */ + dataRendering?: DataRenderingEvent; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + */ + dataRendered?: DataRenderedEvent; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + */ + headerRendering?: HeaderRenderingEvent; + + /** + * Event fired after the header has been rendered. + */ + headerRendered?: HeaderRenderedEvent; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + */ + captionRendering?: CaptionRenderingEvent; + + /** + * Event fired after the caption has been rendered. + */ + captionRendered?: CaptionRenderedEvent; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + */ + footerRendering?: FooterRenderingEvent; + + /** + * Event fired after the footer has been rendered. + */ + footerRendered?: FooterRenderedEvent; + + /** + * Event fired after every TH in the grid header has been rendered. + */ + headerCellRendered?: HeaderCellRenderedEvent; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + */ + rowsRendering?: RowsRenderingEvent; + + /** + * Event fired after data rows are rendered. + */ + rowsRendered?: RowsRenderedEvent; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + */ + schemaGenerated?: SchemaGeneratedEvent; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + */ + columnsCollectionModified?: ColumnsCollectionModifiedEvent; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + */ + requestError?: RequestErrorEvent; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + */ + created?: CreatedEvent; + + /** + * Fired when the grid is destroyed + */ + destroyed?: DestroyedEvent; + /** * Option for igHierarchicalGrid */ @@ -42293,7 +48944,7 @@ interface IgHierarchicalGridMethods { /** * 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. + * 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 @@ -42302,7 +48953,7 @@ interface IgHierarchicalGridMethods { /** * 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. + * 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 @@ -42318,7 +48969,7 @@ interface IgHierarchicalGridMethods { /** * 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. + * 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 @@ -42387,36 +49038,42 @@ interface JQuery { /** * 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; @@ -42424,6 +49081,7 @@ interface JQuery { /** * 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; @@ -42431,30 +49089,35 @@ interface JQuery { * 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; @@ -42462,6 +49125,7 @@ interface JQuery { /** * 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; @@ -42469,117 +49133,788 @@ interface JQuery { * 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; + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + */ + igHierarchicalGrid(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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * If autoAdjustHeight is set to false, the [height](ui.ighierarchicalgrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data ( > 1000 rows rendered at once, no [virtualization](ui.ighierarchicalgrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoAdjustHeight"): boolean; + + /** + * If autoAdjustHeight is set to false, the [height](ui.ighierarchicalgrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.ighierarchicalgrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoAdjustHeight", optionValue: boolean): void; + + /** + * Used for [row virtualization](ui.ighierarchicalgrid#options:rowVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "avgRowHeight"): string|number; + + /** + * Used for [row virtualization](ui.ighierarchicalgrid#options:rowVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "avgRowHeight", optionValue: string|number): void; + + /** + * Used for [column virtualization](ui.ighierarchicalgrid#options:columnVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): string|number; + + /** + * Used for [column virtualization](ui.ighierarchicalgrid#options:columnVirtualization) in [fixed mode](ui.ighierarchicalgrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "avgColumnWidth", optionValue: string|number): void; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.ighierarchicalgrid#options:columns.width) defined. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultColumnWidth"): string|number; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.ighierarchicalgrid#options:columns.width) defined. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "defaultColumnWidth", optionValue: string|number): void; + + /** + * If no [columns](ui.ighierarchicalgrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.ighierarchicalgrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.ighierarchicalgrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.ighierarchicalgrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) as well. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateColumns"): boolean; + + /** + * If no [columns](ui.ighierarchicalgrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.ighierarchicalgrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.ighierarchicalgrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.ighierarchicalgrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.ighierarchicalgrid#options:defaultColumnWidth) as well. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoGenerateColumns", optionValue: boolean): void; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualization"): boolean; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; + + /** + * Determines row virtualization mode. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; + + /** + * Determines row virtualization mode. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMode", optionValue: string): void; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowVirtualization"): boolean; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowVirtualization", optionValue: boolean): void; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.ighierarchicalgrid#options:virtualization) to true and [virtualizationMode](ui.ighierarchicalgrid#options:virtualizationMode) to "fixed". + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columnVirtualization"): boolean; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.ighierarchicalgrid#options:virtualization) to true and [virtualizationMode](ui.ighierarchicalgrid#options:virtualizationMode) to "fixed". + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: boolean): void; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight). + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep"): number; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep", optionValue: number): void; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights"): boolean; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.ighierarchicalgrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights", optionValue: boolean): void; + + /** + * The templating engine that will be used to render the grid [column templates](ui.ighierarchicalgrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "templatingEngine"): string; + + /** + * The templating engine that will be used to render the grid [column templates](ui.ighierarchicalgrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "templatingEngine", optionValue: string): void; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columns"): IgHierarchicalGridColumn[]; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columns", optionValue: IgHierarchicalGridColumn[]): void; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceUrl", 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). + * + */ + igHierarchicalGrid(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). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * Gets the HTTP verb to be used to issue the requests to a remote data source. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "requestType"): string; + + /** + * Sets the HTTP verb to be used to issue the requests to a remote data source. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "responseContentType"): string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + + /** + * Controls the visibility of the grid header. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "showHeader"): boolean; + + /** + * Controls the visibility of the grid header. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; + + /** + * Controls the visibility of the grid footer. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "showFooter"): boolean; + + /** + * Controls the visibility of the grid footer. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedHeaders"): boolean; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedHeaders", optionValue: boolean): void; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedFooters"): boolean; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.ighierarchicalgrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "fixedFooters", optionValue: boolean): void; + + /** + * Caption text that will be shown above the grid header. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "caption"): string; + + /** + * Caption text that will be shown above the grid header. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "caption", optionValue: string): void; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "features"): IgHierarchicalGridFeature[]; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "features", optionValue: IgHierarchicalGridFeature[]): void; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.ighierarchicalgrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.ighierarchicalgrid#options:columns) defined will be extracted in a new object and used. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "localSchemaTransform"): boolean; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.ighierarchicalgrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.ighierarchicalgrid#options:columns) defined will be extracted in a new object and used. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "localSchemaTransform", optionValue: boolean): void; + + /** + * Key of the column containing unique identifiers for the data records. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "primaryKey"): string; + + /** + * Key of the column containing unique identifiers for the data records. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "primaryKey", optionValue: string): void; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "serializeTransactionLog"): boolean; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "serializeTransactionLog", optionValue: boolean): void; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.ighierarchicalgrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoCommit"): boolean; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.ighierarchicalgrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoCommit", optionValue: boolean): void; + + /** + * 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.ighierarchicalgrid#options:autoCommit) is set to false. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "aggregateTransactions"): 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.ighierarchicalgrid#options:autoCommit) is set to false. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "aggregateTransactions", optionValue: boolean): void; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoFormat"): string|boolean; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autoFormat", optionValue: string|boolean): void; + + /** + * Gets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.ighierarchicalgrid#options:columns.template). + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "renderCheckboxes"): boolean; + + /** + * Sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.ighierarchicalgrid#options:columns.template). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "renderCheckboxes", optionValue: boolean): void; + + /** + * URL to which updating requests will be made. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "updateUrl"): string; + + /** + * URL to which updating requests will be made. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; + + /** + * Settings related to REST compliant update routines. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "restSettings"): IgHierarchicalGridRestSettings; + + /** + * Settings related to REST compliant update routines. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: IgHierarchicalGridRestSettings): void; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "alternateRowStyles"): boolean; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "alternateRowStyles", optionValue: boolean): void; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autofitLastColumn"): boolean; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "autofitLastColumn", optionValue: boolean): void; + + /** + * Enables/disables rendering of hover styles 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. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "enableHoverStyles"): boolean; + + /** + * Enables/disables rendering of hover styles 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. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "enableHoverStyles", optionValue: boolean): void; + + /** + * Nables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; + + /** + * Nables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns"): boolean; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns", optionValue: boolean): void; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "jsonpRequest"): boolean; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "jsonpRequest", optionValue: boolean): void; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.ighierarchicalgrid#options:width) and/or [height](ui.ighierarchicalgrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck"): boolean; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.ighierarchicalgrid#options:width) and/or [height](ui.ighierarchicalgrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck", optionValue: boolean): void; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay"): string; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay", optionValue: string): void; + + /** + * Settings related to content scrolling. + * + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "scrollSettings"): IgHierarchicalGridScrollSettings; + + /** + * Settings related to content scrolling. + * + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "scrollSettings", optionValue: IgHierarchicalGridScrollSettings): 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. */ @@ -42587,15 +49922,11 @@ interface JQuery { /** * 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. */ @@ -42603,15 +49934,11 @@ interface JQuery { /** * 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. */ @@ -42619,15 +49946,11 @@ interface JQuery { /** * 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. */ @@ -42635,17 +49958,11 @@ interface JQuery { /** * 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. */ @@ -42653,17 +49970,11 @@ interface JQuery { /** * 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. */ @@ -42671,17 +49982,11 @@ interface JQuery { /** * 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. */ @@ -42710,6 +50015,306 @@ interface JQuery { * @optionValue Define event handler function. */ igHierarchicalGrid(optionLiteral: 'option', optionName: "childGridCreated", optionValue: ChildGridCreatedEvent): void; + + /** + * Event fired when a cell is clicked. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "cellClick"): CellClickEvent; + + /** + * Event fired when a cell is clicked. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "cellClick", optionValue: CellClickEvent): void; + + /** + * Event fired when a cell is right clicked. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "cellRightClick"): CellRightClickEvent; + + /** + * Event fired when a cell is right clicked. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "cellRightClick", optionValue: CellRightClickEvent): void; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event fired after data binding is complete. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event fired after data binding is complete. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataRendering"): DataRenderingEvent; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataRendering", optionValue: DataRenderingEvent): void; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataRendered"): DataRenderedEvent; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "dataRendered", optionValue: DataRenderedEvent): void; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "headerRendering"): HeaderRenderingEvent; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "headerRendering", optionValue: HeaderRenderingEvent): void; + + /** + * Event fired after the header has been rendered. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "headerRendered"): HeaderRenderedEvent; + + /** + * Event fired after the header has been rendered. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "headerRendered", optionValue: HeaderRenderedEvent): void; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "captionRendering"): CaptionRenderingEvent; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "captionRendering", optionValue: CaptionRenderingEvent): void; + + /** + * Event fired after the caption has been rendered. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "captionRendered"): CaptionRenderedEvent; + + /** + * Event fired after the caption has been rendered. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "captionRendered", optionValue: CaptionRenderedEvent): void; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "footerRendering"): FooterRenderingEvent; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "footerRendering", optionValue: FooterRenderingEvent): void; + + /** + * Event fired after the footer has been rendered. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "footerRendered"): FooterRenderedEvent; + + /** + * Event fired after the footer has been rendered. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "footerRendered", optionValue: FooterRenderedEvent): void; + + /** + * Event fired after every TH in the grid header has been rendered. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "headerCellRendered"): HeaderCellRenderedEvent; + + /** + * Event fired after every TH in the grid header has been rendered. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "headerCellRendered", optionValue: HeaderCellRenderedEvent): void; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowsRendering"): RowsRenderingEvent; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowsRendering", optionValue: RowsRenderingEvent): void; + + /** + * Event fired after data rows are rendered. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowsRendered"): RowsRenderedEvent; + + /** + * Event fired after data rows are rendered. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "rowsRendered", optionValue: RowsRenderedEvent): void; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "schemaGenerated"): SchemaGeneratedEvent; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "schemaGenerated", optionValue: SchemaGeneratedEvent): void; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columnsCollectionModified"): ColumnsCollectionModifiedEvent; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "columnsCollectionModified", optionValue: ColumnsCollectionModifiedEvent): void; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "requestError"): RequestErrorEvent; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + * + * @optionValue Define event handler function. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "requestError", optionValue: RequestErrorEvent): void; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "created"): CreatedEvent; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "created", optionValue: CreatedEvent): void; + + /** + * Fired when the grid is destroyed + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "destroyed"): DestroyedEvent; + + /** + * Fired when the grid is destroyed + * + * @optionValue New value to be set. + */ + igHierarchicalGrid(optionLiteral: 'option', optionName: "destroyed", optionValue: DestroyedEvent): void; igHierarchicalGrid(options: IgHierarchicalGrid): JQuery; igHierarchicalGrid(optionLiteral: 'option', optionName: string): any; igHierarchicalGrid(optionLiteral: 'option', options: IgHierarchicalGrid): JQuery; @@ -42721,20 +50326,6 @@ interface GroupCollapsingEvent { } 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 { @@ -42742,20 +50333,6 @@ interface GroupCollapsedEvent { } 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 { @@ -42763,20 +50340,6 @@ interface GroupExpandingEvent { } 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 { @@ -42784,20 +50347,6 @@ interface GroupExpandedEvent { } 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 { @@ -42808,41 +50357,21 @@ interface IgGridMultiColumnHeaders { /** * 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; @@ -42914,21 +50443,11 @@ interface JQuery { /** * 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. */ @@ -42936,21 +50455,11 @@ interface JQuery { /** * 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. */ @@ -42958,21 +50467,11 @@ interface JQuery { /** * 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. */ @@ -42980,21 +50479,11 @@ interface JQuery { /** * 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. */ @@ -43010,20 +50499,6 @@ interface PageIndexChangingEvent { } 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 { @@ -43031,15 +50506,6 @@ interface PageIndexChangedEvent { } interface PageIndexChangedEventUIParam { - /** - * Used to get reference to GridPaging. - */ - owner?: any; - - /** - * Used to get current page index. - */ - pageIndex?: any; } interface PageSizeChangingEvent { @@ -43047,16 +50513,6 @@ interface PageSizeChangingEvent { } interface PageSizeChangingEventUIParam { - /** - * Used to get reference to GridPaging. - */ - owner?: any; - - /** - * Used to get current page size. - */ - currentPageSize?: any; - /** * Used to get new page size. */ @@ -43068,15 +50524,6 @@ interface PageSizeChangedEvent { } interface PageSizeChangedEventUIParam { - /** - * Used to get reference to GridPaging. - */ - owner?: any; - - /** - * Used to get current page size. - */ - pageSize?: any; } interface PagerRenderingEvent { @@ -43084,15 +50531,6 @@ interface PagerRenderingEvent { } interface PagerRenderingEventUIParam { - /** - * Used to get reference to GridPaging. - */ - owner?: any; - - /** - * Used to get reference to grid's data source. - */ - dataSource?: any; } interface PagerRenderedEvent { @@ -43100,15 +50538,6 @@ interface PagerRenderedEvent { } interface PagerRenderedEventUIParam { - /** - * Used to get reference to GridPaging. - */ - owner?: any; - - /** - * Used to get reference to grid's data source. - */ - dataSource?: any; } interface IgGridPaging { @@ -43333,59 +50762,34 @@ interface IgGridPaging { /** * 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. + * Event fired after the page size is changed from the page size dropdown. */ 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; @@ -43916,22 +51320,12 @@ interface JQuery { /** * 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. */ @@ -43939,19 +51333,11 @@ interface JQuery { /** * 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. */ @@ -43960,10 +51346,6 @@ interface JQuery { /** * 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; @@ -43971,10 +51353,6 @@ interface JQuery { /** * 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. @@ -43983,19 +51361,11 @@ interface JQuery { /** * 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. */ @@ -44003,21 +51373,13 @@ interface JQuery { /** * 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. + * Event fired after the page size is changed from the page size dropdown. */ 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. + * Event fired after the page size is changed from the page size dropdown. * * @optionValue Define event handler function. */ @@ -44025,19 +51387,11 @@ interface JQuery { /** * 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. */ @@ -44090,25 +51444,6 @@ interface ColumnResizingEvent { } 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 { @@ -44116,25 +51451,6 @@ interface ColumnResizingRefusedEvent { } 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 { @@ -44142,30 +51458,6 @@ interface ColumnResizedEvent { } 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 { @@ -44200,35 +51492,16 @@ interface IgGridResizing { /** * 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; @@ -44329,23 +51602,11 @@ interface JQuery { /** * 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. */ @@ -44353,23 +51614,11 @@ interface JQuery { /** * 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. */ @@ -44377,25 +51626,11 @@ interface JQuery { /** * 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. */ @@ -44479,20 +51714,6 @@ interface ResponsiveColumnHidingEvent { } 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 { @@ -44500,20 +51721,6 @@ interface ResponsiveColumnHiddenEvent { } 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 { @@ -44521,20 +51728,6 @@ interface ResponsiveColumnShowingEvent { } 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 { @@ -44542,20 +51735,6 @@ interface ResponsiveColumnShownEvent { } 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 { @@ -44563,20 +51742,6 @@ interface ResponsiveModeChangedEvent { } 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 { @@ -44667,51 +51832,26 @@ interface IgGridResponsive { /** * 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; @@ -44748,10 +51888,10 @@ interface ResponsiveModeSettings { } declare namespace Infragistics { - class ResponsiveMode { - constructor(settings: ResponsiveModeSettings); - isActive(): void; - } +class ResponsiveMode { + constructor(settings: ResponsiveModeSettings); + isActive(): void; +} } interface IgniteUIStatic { ResponsiveMode: typeof Infragistics.ResponsiveMode; @@ -44768,10 +51908,10 @@ interface InfragisticsModeSettings { } declare namespace Infragistics { - class InfragisticsMode { - constructor(settings: InfragisticsModeSettings); - isActive(): void; - } +class InfragisticsMode { + constructor(settings: InfragisticsModeSettings); + isActive(): void; +} } interface IgniteUIStatic { InfragisticsMode: typeof Infragistics.InfragisticsMode; @@ -44788,10 +51928,10 @@ interface BootstrapModeSettings { } declare namespace Infragistics { - class BootstrapMode { - constructor(settings: BootstrapModeSettings); - isActive(): void; - } +class BootstrapMode { + constructor(settings: BootstrapModeSettings); + isActive(): void; +} } interface IgniteUIStatic { BootstrapMode: typeof Infragistics.BootstrapMode; @@ -44971,21 +52111,11 @@ interface JQuery { /** * 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. */ @@ -44993,21 +52123,11 @@ interface JQuery { /** * 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. */ @@ -45015,21 +52135,11 @@ interface JQuery { /** * 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. */ @@ -45037,21 +52147,11 @@ interface JQuery { /** * 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. */ @@ -45059,21 +52159,11 @@ interface JQuery { /** * 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. */ @@ -45089,40 +52179,6 @@ interface RowSelectorClickedEvent { } 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 { @@ -45130,50 +52186,6 @@ interface CheckBoxStateChangingEvent { } 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 { @@ -45181,45 +52193,6 @@ interface CheckBoxStateChangedEvent { } 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 { @@ -45242,6 +52215,7 @@ interface IgGridRowSelectors { rowNumberingSeed?: number; /** + * defines width of the row selector`s column in pixels or percentage. * * * Valid values: @@ -45298,43 +52272,16 @@ interface IgGridRowSelectors { /** * 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; @@ -45396,12 +52343,14 @@ interface JQuery { igGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed", optionValue: number): void; /** - * * + * Defines width of the row selector`s column in pixels or percentage. + * */ igGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth"): string|number; /** - * * + * Defines width of the row selector`s column in pixels or percentage. + * * * @optionValue New value to be set. */ @@ -45511,27 +52460,11 @@ interface JQuery { /** * 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. */ @@ -45539,31 +52472,11 @@ interface JQuery { /** * 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. */ @@ -45571,29 +52484,11 @@ interface JQuery { /** * 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. */ @@ -45609,30 +52504,6 @@ interface RowSelectionChangingEvent { } 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 { @@ -45640,20 +52511,6 @@ interface RowSelectionChangedEvent { } 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 { @@ -45661,40 +52518,6 @@ interface CellSelectionChangingEvent { } 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 { @@ -45702,20 +52525,6 @@ interface CellSelectionChangedEvent { } 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 { @@ -45723,15 +52532,6 @@ interface ActiveCellChangingEvent { } interface ActiveCellChangingEventUIParam { - /** - * Used to get reference to GridSelection. - */ - owner?: any; - - /** - * Used to get reference to cell object. - */ - cell?: any; } interface ActiveCellChangedEvent { @@ -45739,15 +52539,6 @@ interface ActiveCellChangedEvent { } interface ActiveCellChangedEventUIParam { - /** - * Used to get reference to GridSelection. - */ - owner?: any; - - /** - * Used to get reference to cell object. - */ - cell?: any; } interface ActiveRowChangingEvent { @@ -45755,15 +52546,6 @@ interface ActiveRowChangingEvent { } interface ActiveRowChangingEventUIParam { - /** - * Used to get reference to GridSelection. - */ - owner?: any; - - /** - * Used to get reference to row object. - */ - row?: any; } interface ActiveRowChangedEvent { @@ -45771,15 +52553,6 @@ interface ActiveRowChangedEvent { } interface ActiveRowChangedEventUIParam { - /** - * Used to get reference to GridSelection. - */ - owner?: any; - - /** - * Used to get reference to row object. - */ - row?: any; } interface IgGridSelection { @@ -45850,122 +52623,44 @@ interface IgGridSelection { /** * 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; @@ -46050,28 +52745,28 @@ interface IgGridSelectionMethods { /** * 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. + * 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. + * 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. + * 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. + * If multiple selection is enabled the function will return null. */ selectedRow(): Object; @@ -46108,93 +52803,93 @@ interface SelectionCollectionSettings { } declare namespace Infragistics { - class SelectionCollection { - constructor(settings: SelectionCollectionSettings); - addSubscriber(subscriber: Object, owner: Object): void; - removeSubscriber(subscriberId: Object, owner: Object): void; - changeOwner(newOwner: Object): void; - isSelected(identifier: Object, forOwner: Object): void; - isActive(identifier: Object, forOwner: Object): void; - elementFromIdentifier(identifier: Object): void; - toggle(element: Object): void; - activate(identifier: Object, element: Object, suppress: Object): void; - deactivate(suppress: Object): void; - select(identifier: Object, add: Object, info: Object, suppress: Object): void; - rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; - rangeDeselect(range: Object, info: Object, suppress: Object): void; - deselect(identifier: Object, info: Object, suppress: Object): void; - deselectAll(suppress: Object): void; - clearSelection(forOwner: Object): void; - cleanAll(forOwner: Object): void; - onlyOneSelected(): void; - selectedCells(): void; - selectedRows(): void; - selectionLength(): void; - } +class SelectionCollection { + constructor(settings: SelectionCollectionSettings); + addSubscriber(subscriber: Object, owner: Object): void; + removeSubscriber(subscriberId: Object, owner: Object): void; + changeOwner(newOwner: Object): void; + isSelected(identifier: Object, forOwner: Object): void; + isActive(identifier: Object, forOwner: Object): void; + elementFromIdentifier(identifier: Object): void; + toggle(element: Object): void; + activate(identifier: Object, element: Object, suppress: Object): void; + deactivate(suppress: Object): void; + select(identifier: Object, add: Object, info: Object, suppress: Object): void; + rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; + rangeDeselect(range: Object, info: Object, suppress: Object): void; + deselect(identifier: Object, info: Object, suppress: Object): void; + deselectAll(suppress: Object): void; + clearSelection(forOwner: Object): void; + cleanAll(forOwner: Object): void; + onlyOneSelected(): void; + selectedCells(): void; + selectedRows(): void; + selectionLength(): void; +} } interface IgniteUIStatic { SelectionCollection: typeof Infragistics.SelectionCollection; } declare namespace Infragistics { - class SelectedRowsCollection { - constructor(settings: SelectionCollectionSettings); - isSelected(identifier: Object, forOwner: Object): void; - isActive(identifier: Object, forOwner: Object): void; - selectedDataRows(): void; - selectedRows(): void; - activeRow(): void; - elementFromIdentifier(identifier: Object): void; - elementPosition(identifier: Object, element: Object): void; - onlyOneSelected(): void; - addSubscriber(subscriber: Object, owner: Object): void; - removeSubscriber(subscriberId: Object, owner: Object): void; - changeOwner(newOwner: Object): void; - toggle(element: Object): void; - activate(identifier: Object, element: Object, suppress: Object): void; - deactivate(suppress: Object): void; - select(identifier: Object, add: Object, info: Object, suppress: Object): void; - rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; - rangeDeselect(range: Object, info: Object, suppress: Object): void; - deselect(identifier: Object, info: Object, suppress: Object): void; - deselectAll(suppress: Object): void; - clearSelection(forOwner: Object): void; - cleanAll(forOwner: Object): void; - selectedCells(): void; - selectionLength(): void; - } +class SelectedRowsCollection { + constructor(settings: SelectionCollectionSettings); + isSelected(identifier: Object, forOwner: Object): void; + isActive(identifier: Object, forOwner: Object): void; + selectedDataRows(): void; + selectedRows(): void; + activeRow(): void; + elementFromIdentifier(identifier: Object): void; + elementPosition(identifier: Object, element: Object): void; + onlyOneSelected(): void; + addSubscriber(subscriber: Object, owner: Object): void; + removeSubscriber(subscriberId: Object, owner: Object): void; + changeOwner(newOwner: Object): void; + toggle(element: Object): void; + activate(identifier: Object, element: Object, suppress: Object): void; + deactivate(suppress: Object): void; + select(identifier: Object, add: Object, info: Object, suppress: Object): void; + rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; + rangeDeselect(range: Object, info: Object, suppress: Object): void; + deselect(identifier: Object, info: Object, suppress: Object): void; + deselectAll(suppress: Object): void; + clearSelection(forOwner: Object): void; + cleanAll(forOwner: Object): void; + selectedCells(): void; + selectionLength(): void; +} } interface IgniteUIStatic { SelectedRowsCollection: typeof Infragistics.SelectedRowsCollection; } declare namespace Infragistics { - class SelectedCellsCollection { - constructor(settings: SelectionCollectionSettings); - isSelected(identifier: Object, forOwner: Object): void; - atLeastOneSelected(rowId: Object, forOwner: Object): void; - isActive(identifier: Object, forOwner: Object): void; - selectedCells(): void; - activeCell(): void; - elementFromIdentifier(identifier: Object): void; - elementPosition(identifier: Object, element: Object): void; - onlyOneSelected(): void; - addSubscriber(subscriber: Object, owner: Object): void; - removeSubscriber(subscriberId: Object, owner: Object): void; - changeOwner(newOwner: Object): void; - toggle(element: Object): void; - activate(identifier: Object, element: Object, suppress: Object): void; - deactivate(suppress: Object): void; - select(identifier: Object, add: Object, info: Object, suppress: Object): void; - rangeSelect(range: Object, add: Object, prevRange: Object, info: Object, suppress: Object): void; - rangeDeselect(range: Object, info: Object, suppress: Object): void; - deselect(identifier: Object, info: Object, suppress: Object): void; - deselectAll(suppress: Object): void; - clearSelection(forOwner: Object): void; - cleanAll(forOwner: Object): void; - selectedRows(): void; - selectionLength(): void; - } +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; @@ -46361,32 +53056,12 @@ interface JQuery { /** * 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. */ @@ -46394,27 +53069,11 @@ interface JQuery { /** * 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. */ @@ -46423,42 +53082,12 @@ interface JQuery { /** * 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. */ @@ -46466,33 +53095,11 @@ interface JQuery { /** * 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. */ @@ -46501,32 +53108,12 @@ interface JQuery { /** * 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. */ @@ -46534,31 +53121,11 @@ interface JQuery { /** * 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. */ @@ -46567,26 +53134,12 @@ interface JQuery { /** * 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. */ @@ -46594,25 +53147,11 @@ interface JQuery { /** * 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. */ @@ -46623,738 +53162,6 @@ interface JQuery { igGridSelection(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igGridSelection(methodName: string, ...methodParams: any[]): any; } -interface ButtonOKClickEvent { - (event: Event, ui: ButtonOKClickEventUIParam): void; -} - -interface ButtonOKClickEventUIParam { - /** - * Used to get the reference to the igGridModalDialog widget. - */ - owner?: any; - - /** - * Used to get the reference to the igGridModalDialog element - */ - modalDialog?: any; -} - -interface ButtonCancelClickEvent { - (event: Event, ui: ButtonCancelClickEventUIParam): void; -} - -interface ButtonCancelClickEventUIParam { - /** - * Used to get the reference to the igGridModalDialog widget. - */ - owner?: any; - - /** - * Used to get the reference to the igGridModalDialog element - */ - modalDialog?: any; -} - -interface IgGridModalDialog { - buttonApplyText?: string; - buttonCancelText?: string; - buttonApplyTitle?: any; - buttonCancelTitle?: any; - modalDialogCaptionText?: string; - - /** - * The default modal dialog width in pixels. - */ - modalDialogWidth?: number; - - /** - * The default modal dialog height in pixels. - */ - modalDialogHeight?: number; - renderFooterButtons?: boolean; - animationDuration?: number; - buttonApplyDisabled?: boolean; - - /** - * If true and Enter is pressed - close modal dialog(NOTE: buttonApplyDisabled should be set to false - otherwise this options is ignored) - */ - closeModalDialogOnEnter?: boolean; - - /** - * Tab index to assign to containers and buttons inside the dialog - */ - tabIndex?: number; - - /** - * Event fired before the modal dialog is opened. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.owner.grid to get the reference to the igGrid widget. - */ - modalDialogOpening?: ModalDialogOpeningEvent; - - /** - * Event fired after the modal dialog is already opened. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - modalDialogOpened?: ModalDialogOpenedEvent; - - /** - * Event fired every time the modal dialog changes its position. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. - * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. - */ - modalDialogMoving?: ModalDialogMovingEvent; - - /** - * Event fired before the modal dialog is closed. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - modalDialogClosing?: ModalDialogClosingEvent; - - /** - * Event fired after the modal dialog has been closed. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - modalDialogClosed?: ModalDialogClosedEvent; - - /** - * Event fired before the contents of the modal dialog are rendered. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - modalDialogContentsRendering?: ModalDialogContentsRenderingEvent; - - /** - * Event fired after the contents of the modal dialog are rendered. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - modalDialogContentsRendered?: ModalDialogContentsRenderedEvent; - - /** - * Event fired when the button OK/Apply is clicked - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - buttonOKClick?: ButtonOKClickEvent; - - /** - * Event fired when the button Cancel is clicked - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - buttonCancelClick?: ButtonCancelClickEvent; - - /** - * Option for igGridModalDialog - */ - [optionName: string]: any; -} -interface IgGridModalDialogMethods { - openModalDialog(): void; - closeModalDialog(accepted: Object, fromUI: Object): void; - getCaptionButtonContainer(): void; - getFooter(): void; - getContent(): void; - destroy(): void; -} -interface JQuery { - data(propertyName: "igGridModalDialog"): IgGridModalDialogMethods; -} - -interface IgEditorFilter { - /** - * Option for igEditorFilter - */ - [optionName: string]: any; -} -interface IgEditorFilterMethods { - setFocus(delay: Object, toggle: Object): void; - remove(): void; - exitEditMode(): void; - validator(): void; - hasInvalidMessage(): void; - destroy(): void; -} -interface JQuery { - data(propertyName: "igEditorFilter"): IgEditorFilterMethods; -} - -declare namespace Infragistics { - class EditorProvider { - /** - * Create handlers cache - * - * @param callbacks - * @param key - * @param editorOptions - * @param tabIndex - * @param format - * @param element - */ - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - keyDown(evt: Object, ui: Object): void; - attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; - getEditor(): void; - refreshValue(): void; - getValue(): void; - setValue(val: Object): void; - setFocus(toggle: Object): void; - setSize(width: Object, height: Object): void; - removeFromParent(): void; - destroy(): void; - validator(): void; - validate(): void; - requestValidate(evt: Object): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderBase { - /** - * Call parent createEditor - * - * @param callbacks - * @param key - * @param editorOptions - * @param tabIndex - * @param format - * @param element - */ - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - keyDown(evt: Object, ui: Object): void; - attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; - getEditor(): void; - getValue(): void; - setValue(val: Object): void; - validate(): void; - requestValidate(evt: Object): void; - } -} - -declare namespace Infragistics { - class EditorProviderText { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - keyDown(evt: Object, ui: Object): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderNumeric { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - getValue(): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderCurrency { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderPercent { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderMask { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderDate { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderDatePicker { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - removeFromParent(): void; - textChanged(evt: Object, ui: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - destroy(): void; - refreshValue(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderBoolean { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - valueChanged(evt: Object, ui: Object): void; - refreshValue(): void; - getValue(): void; - setValue(val: Object): void; - setSize(width: Object, height: Object): void; - removeFromParent(): void; - destroy(): void; - textChanged(evt: Object, ui: Object): void; - setFocus(): void; - validator(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderCombo { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - keyDown(evt: Object, ui: Object): void; - internalSelectionChanged(evt: Object, ui: Object): void; - selectionChanged(evt: Object, ui: Object): void; - refreshValue(): void; - getValue(): void; - setValue(val: Object, fire: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - validator(): void; - destroy(): void; - isValid(): void; - attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; - getEditor(): void; - validate(): void; - requestValidate(evt: Object): void; - } -} - -declare namespace Infragistics { - class EditorProviderObjectCombo { - getValue(): void; - setValue(val: Object, fire: Object): void; - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - keyDown(evt: Object, ui: Object): void; - internalSelectionChanged(evt: Object, ui: Object): void; - selectionChanged(evt: Object, ui: Object): void; - refreshValue(): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - removeFromParent(): void; - validator(): void; - destroy(): void; - isValid(): void; - } -} - -declare namespace Infragistics { - class EditorProviderRating { - createEditor(callbacks: Object, key: Object, editorOptions: Object, tabIndex: Object, format: Object, element: Object): void; - internalValueChange(evt: Object, ui: Object): void; - valueChange(evt: Object, ui: Object): void; - setValue(val: Object): void; - setSize(width: Object, height: Object): void; - setFocus(): void; - validator(): void; - destroy(): void; - isValid(): void; - keyDown(evt: Object, ui: Object): void; - attachErrorEvents(errorShowing: Object, errorShown: Object, errorHidden: Object): void; - getEditor(): void; - refreshValue(): void; - getValue(): void; - removeFromParent(): void; - validate(): void; - requestValidate(evt: Object): void; - } -} - -declare namespace Infragistics { - class SortingExpressionsManager { - setGridInstance(grid: Object): void; - - /** - * Insert expr at the first position of the se (sorting expressions) if there are not any other expressions with flag group by - * otherwise if there are such expressions inserts after the last - * - * @param se - * @param expr - * @param feature - */ - addSortingExpression(se: Object, expr: Object, feature: Object): void; - setFormattersForSortingExprs(exprs: Object, grid: Object): void; - } -} - -interface JQuery { - igGridModalDialog(methodName: "openModalDialog"): void; - igGridModalDialog(methodName: "closeModalDialog", accepted: Object, fromUI: Object): void; - igGridModalDialog(methodName: "getCaptionButtonContainer"): void; - igGridModalDialog(methodName: "getFooter"): void; - igGridModalDialog(methodName: "getContent"): void; - igGridModalDialog(methodName: "destroy"): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyText"): string; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyText", optionValue: string): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelText"): string; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelText", optionValue: string): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyTitle"): any; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyTitle", optionValue: any): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelTitle"): any; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelTitle", optionValue: any): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogCaptionText"): string; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogCaptionText", optionValue: string): void; - - /** - * The default modal dialog width in pixels. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogWidth"): number; - - /** - * The default modal dialog width in pixels. - * - * @optionValue New value to be set. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogWidth", optionValue: number): void; - - /** - * The default modal dialog height in pixels. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogHeight"): number; - - /** - * The default modal dialog height in pixels. - * - * @optionValue New value to be set. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogHeight", optionValue: number): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "renderFooterButtons"): boolean; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "renderFooterButtons", optionValue: boolean): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "animationDuration"): number; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyDisabled"): boolean; - - /** - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonApplyDisabled", optionValue: boolean): void; - - /** - * If true and Enter is pressed - close modal dialog(NOTE: buttonApplyDisabled should be set to false - otherwise this options is ignored) - */ - igGridModalDialog(optionLiteral: 'option', optionName: "closeModalDialogOnEnter"): boolean; - - /** - * If true and Enter is pressed - close modal dialog(NOTE: buttonApplyDisabled should be set to false - otherwise this options is ignored) - * - * @optionValue New value to be set. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "closeModalDialogOnEnter", optionValue: boolean): void; - - /** - * Tab index to assign to containers and buttons inside the dialog - */ - igGridModalDialog(optionLiteral: 'option', optionName: "tabIndex"): number; - - /** - * Tab index to assign to containers and buttons inside the dialog - * - * @optionValue New value to be set. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; - - /** - * Event fired before the modal dialog is opened. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.owner.grid to get the reference to the igGrid widget. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpening"): ModalDialogOpeningEvent; - - /** - * Event fired before the modal dialog is opened. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.owner.grid to get the reference to the igGrid widget. - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpening", optionValue: ModalDialogOpeningEvent): void; - - /** - * Event fired after the modal dialog is already opened. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpened"): ModalDialogOpenedEvent; - - /** - * Event fired after the modal dialog is already opened. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogOpened", optionValue: ModalDialogOpenedEvent): void; - - /** - * Event fired every time the modal dialog changes its position. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. - * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogMoving"): ModalDialogMovingEvent; - - /** - * Event fired every time the modal dialog changes its position. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * Use ui.originalPosition to get the original position of the modal dialog div as { top, left } object, relative to the page. - * Use ui.position to get the current position of the modal dialog div as { top, left } object, relative to the page. - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogMoving", optionValue: ModalDialogMovingEvent): void; - - /** - * Event fired before the modal dialog is closed. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosing"): ModalDialogClosingEvent; - - /** - * Event fired before the modal dialog is closed. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosing", optionValue: ModalDialogClosingEvent): void; - - /** - * Event fired after the modal dialog has been closed. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosed"): ModalDialogClosedEvent; - - /** - * Event fired after the modal dialog has been closed. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogClosed", optionValue: ModalDialogClosedEvent): void; - - /** - * Event fired before the contents of the modal dialog are rendered. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendering"): ModalDialogContentsRenderingEvent; - - /** - * Event fired before the contents of the modal dialog are rendered. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendering", optionValue: ModalDialogContentsRenderingEvent): void; - - /** - * Event fired after the contents of the modal dialog are rendered. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendered"): ModalDialogContentsRenderedEvent; - - /** - * Event fired after the contents of the modal dialog are rendered. - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "modalDialogContentsRendered", optionValue: ModalDialogContentsRenderedEvent): void; - - /** - * Event fired when the button OK/Apply is clicked - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonOKClick"): ButtonOKClickEvent; - - /** - * Event fired when the button OK/Apply is clicked - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonOKClick", optionValue: ButtonOKClickEvent): void; - - /** - * Event fired when the button Cancel is clicked - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelClick"): ButtonCancelClickEvent; - - /** - * Event fired when the button Cancel is clicked - * The handler function takes arguments evt and ui. - * Use ui.owner to get the reference to the igGridModalDialog widget. - * Use ui.modalDialog to get the reference to the igGridModalDialog element - * - * @optionValue Define event handler function. - */ - igGridModalDialog(optionLiteral: 'option', optionName: "buttonCancelClick", optionValue: ButtonCancelClickEvent): void; - igGridModalDialog(options: IgGridModalDialog): JQuery; - igGridModalDialog(optionLiteral: 'option', optionName: string): any; - igGridModalDialog(optionLiteral: 'option', options: IgGridModalDialog): JQuery; - igGridModalDialog(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; - igGridModalDialog(methodName: string, ...methodParams: any[]): any; -} -interface JQuery { - igEditorFilter(methodName: "setFocus", delay: Object, toggle: Object): void; - igEditorFilter(methodName: "remove"): void; - igEditorFilter(methodName: "exitEditMode"): void; - igEditorFilter(methodName: "validator"): void; - igEditorFilter(methodName: "hasInvalidMessage"): void; - igEditorFilter(methodName: "destroy"): void; - igEditorFilter(options: IgEditorFilter): JQuery; - igEditorFilter(optionLiteral: 'option', optionName: string): any; - igEditorFilter(optionLiteral: 'option', options: IgEditorFilter): JQuery; - igEditorFilter(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; - igEditorFilter(methodName: string, ...methodParams: any[]): any; -} interface IgGridSortingColumnSetting { /** * Identifies the grid column by key. Either key or index must be set in every column setting. @@ -47423,25 +53230,6 @@ interface ColumnSortingEvent { } 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 { @@ -47449,25 +53237,6 @@ interface ColumnSortedEvent { } 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 { @@ -47475,25 +53244,6 @@ interface ModalDialogSortingChangedEvent { } 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 { @@ -47501,20 +53251,6 @@ interface ModalDialogButtonUnsortClickEvent { } 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 { @@ -47522,20 +53258,6 @@ interface ModalDialogSortClickEvent { } 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 { @@ -47749,138 +53471,71 @@ interface IgGridSorting { /** * 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; @@ -48398,24 +54053,12 @@ interface JQuery { /** * 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. */ @@ -48423,23 +54066,11 @@ interface JQuery { /** * 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. */ @@ -48447,19 +54078,11 @@ interface JQuery { /** * 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. */ @@ -48467,19 +54090,11 @@ interface JQuery { /** * 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. */ @@ -48487,23 +54102,11 @@ interface JQuery { /** * 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. */ @@ -48511,19 +54114,11 @@ interface JQuery { /** * 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. */ @@ -48531,19 +54126,11 @@ interface JQuery { /** * 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. */ @@ -48551,19 +54138,11 @@ interface JQuery { /** * 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. */ @@ -48571,19 +54150,11 @@ interface JQuery { /** * 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. */ @@ -48591,23 +54162,11 @@ interface JQuery { /** * 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. */ @@ -48615,21 +54174,11 @@ interface JQuery { /** * 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. */ @@ -48637,21 +54186,11 @@ interface JQuery { /** * 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. */ @@ -48659,21 +54198,11 @@ interface JQuery { /** * 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. */ @@ -48681,19 +54210,11 @@ interface JQuery { /** * 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. */ @@ -48744,16 +54265,13 @@ interface IgGridSummariesColumnSettingSummaryOperand { 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 + * Specifies a format that will be applied to the current summary operant. + * When this option is not set, the [format](ui.iggrid#options:columns.format) of the column it is in will taken into account. + * When this option and the column [format](ui.iggrid#options:columns.format) is not set, the regional settings will be taken depending on the [autoFormat](ui.iggrid#options:autoFormat) option. + * If the column type is not specified in the [autoFormat](ui.iggrid#options:autoFormat) option and no format is set for both column and summary operand, no formatting is applied. * */ - decimalDisplay?: number; - - /** - * Specifies whether to be used grid formatter for result for the current summary operand. - * - */ - isGridFormatter?: boolean; + format?: string; /** * Option for IgGridSummariesColumnSettingSummaryOperand @@ -48797,10 +54315,6 @@ interface SummariesCalculatingEvent { } interface SummariesCalculatingEventUIParam { - /** - * Used to access the igGridSummaries widget object. - */ - owner?: any; } interface SummariesCalculatedEvent { @@ -48808,15 +54322,6 @@ interface SummariesCalculatedEvent { } interface SummariesCalculatedEventUIParam { - /** - * Used to get data for calculated summaries - */ - data?: any; - - /** - * Used to access the igGridSummaries widget object. - */ - owner?: any; } interface SummariesMethodSelectionChangedEvent { @@ -48824,25 +54329,6 @@ interface SummariesMethodSelectionChangedEvent { } 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 { @@ -48850,15 +54336,6 @@ interface SummariesTogglingEvent { } interface SummariesTogglingEventUIParam { - /** - * Used to get whether summaries are shown or not. - */ - isToShow?: any; - - /** - * Used to access the igGridSummaries widget object. - */ - owner?: any; } interface SummariesToggledEvent { @@ -48866,15 +54343,6 @@ interface SummariesToggledEvent { } interface SummariesToggledEventUIParam { - /** - * Used to get whether summaries are shown or not. - */ - isToShow?: any; - - /** - * Used to access the igGridSummaries widget object. - */ - owner?: any; } interface DropDownOKClickedEvent { @@ -48882,20 +54350,6 @@ interface DropDownOKClickedEvent { } 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 { @@ -48903,15 +54357,6 @@ interface DropDownCancelClickedEvent { } 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 { @@ -48968,12 +54413,6 @@ interface IgGridSummaries { */ 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). * @@ -49051,12 +54490,6 @@ interface IgGridSummaries { */ 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) * @@ -49077,94 +54510,59 @@ interface IgGridSummaries { /** * 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; @@ -49374,20 +54772,6 @@ interface JQuery { */ 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). * @@ -49556,20 +54940,6 @@ interface JQuery { */ 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) * @@ -49613,18 +54983,12 @@ interface JQuery { /** * 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. */ @@ -49632,17 +54996,11 @@ interface JQuery { /** * 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. */ @@ -49651,18 +55009,12 @@ interface JQuery { /** * 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. */ @@ -49670,17 +55022,11 @@ interface JQuery { /** * 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. */ @@ -49689,16 +55035,12 @@ interface JQuery { /** * 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. */ @@ -49706,17 +55048,11 @@ interface JQuery { /** * 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. */ @@ -49724,21 +55060,11 @@ interface JQuery { /** * 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. */ @@ -49747,18 +55073,12 @@ interface JQuery { /** * 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. */ @@ -49766,17 +55086,11 @@ interface JQuery { /** * 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. */ @@ -49784,19 +55098,11 @@ interface JQuery { /** * 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. */ @@ -49804,17 +55110,11 @@ interface JQuery { /** * 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. */ @@ -49923,49 +55223,21 @@ interface IgGridTooltips { /** * 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; @@ -50123,25 +55395,11 @@ interface JQuery { /** * 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. */ @@ -50149,25 +55407,11 @@ interface JQuery { /** * 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. */ @@ -50175,25 +55419,11 @@ interface JQuery { /** * 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. */ @@ -50201,25 +55431,11 @@ interface JQuery { /** * 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. */ @@ -50436,20 +55652,6 @@ interface EditRowStartingEvent { } 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 { @@ -50457,20 +55659,6 @@ interface EditRowStartedEvent { } 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 { @@ -50478,35 +55666,6 @@ interface EditRowEndingEvent { } 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 { @@ -50514,35 +55673,6 @@ interface EditRowEndedEvent { } 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 { @@ -50550,40 +55680,6 @@ interface EditCellStartingEvent { } 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 { @@ -50591,40 +55687,6 @@ interface EditCellStartedEvent { } 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 { @@ -50632,50 +55694,6 @@ interface EditCellEndingEvent { } 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 { @@ -50683,50 +55701,6 @@ interface EditCellEndedEvent { } 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 { @@ -50734,20 +55708,6 @@ interface RowAddingEvent { } 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 { @@ -50755,20 +55715,6 @@ interface RowAddedEvent { } 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 { @@ -50776,20 +55722,6 @@ interface RowDeletingEvent { } 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 { @@ -50797,20 +55729,6 @@ interface RowDeletedEvent { } 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 { @@ -50818,10 +55736,6 @@ interface DataDirtyEvent { } interface DataDirtyEventUIParam { - /** - * Used to get a reference to GridUpdating. - */ - owner?: any; } interface GeneratePrimaryKeyValueEvent { @@ -50829,15 +55743,6 @@ interface GeneratePrimaryKeyValueEvent { } 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 { @@ -50845,15 +55750,6 @@ interface RowEditDialogBeforeOpenEvent { } 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 { @@ -50861,15 +55757,6 @@ interface RowEditDialogAfterOpenEvent { } 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 { @@ -50877,15 +55764,6 @@ interface RowEditDialogBeforeCloseEvent { } 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 { @@ -50893,15 +55771,6 @@ interface RowEditDialogAfterCloseEvent { } 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 { @@ -50909,15 +55778,6 @@ interface RowEditDialogContentsRenderedEvent { } 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 { @@ -51018,7 +55878,7 @@ interface IgGridUpdating { 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. + * Specifies how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma 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; @@ -51079,215 +55939,102 @@ interface IgGridUpdating { /** * 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; @@ -51627,13 +56374,13 @@ interface JQuery { 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. + * Gets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma 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. + * Sets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma 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. @@ -51767,22 +56514,12 @@ interface JQuery { /** * 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. */ @@ -51790,21 +56527,11 @@ interface JQuery { /** * 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. */ @@ -51813,28 +56540,12 @@ interface JQuery { /** * 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. */ @@ -51842,27 +56553,11 @@ interface JQuery { /** * 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. */ @@ -51871,30 +56566,12 @@ interface JQuery { /** * 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. */ @@ -51902,29 +56579,11 @@ interface JQuery { /** * 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. */ @@ -51933,34 +56592,12 @@ interface JQuery { /** * 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. */ @@ -51968,33 +56605,11 @@ interface JQuery { /** * 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. */ @@ -52003,22 +56618,12 @@ interface JQuery { /** * 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. */ @@ -52026,21 +56631,11 @@ interface JQuery { /** * 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. */ @@ -52049,22 +56644,12 @@ interface JQuery { /** * 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. */ @@ -52072,21 +56657,11 @@ interface JQuery { /** * 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. */ @@ -52095,18 +56670,12 @@ interface JQuery { /** * 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. */ @@ -52114,19 +56683,11 @@ interface JQuery { /** * 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. */ @@ -52134,19 +56695,11 @@ interface JQuery { /** * 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. */ @@ -52154,19 +56707,11 @@ interface JQuery { /** * 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. */ @@ -52174,19 +56719,11 @@ interface JQuery { /** * 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. */ @@ -52194,19 +56731,11 @@ interface JQuery { /** * 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. */ @@ -52214,19 +56743,11 @@ interface JQuery { /** * 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. */ @@ -52663,26 +57184,26 @@ interface JQuery { } declare namespace Infragistics { - class SelectionWrapper { - constructor(NODE: any); - getSelectedItem(): void; - getSelectionAsText(): void; - select(element: Object): void; - insertElement(element: Object): void; - execCommand(name: Object, args: Object): void; - replaceNode(newNode: Object): void; - insertTable(table: Object): void; - focus(): void; - } +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; +SelectionWrapper: typeof Infragistics.SelectionWrapper; } declare namespace Infragistics { - class ToolbarHelper { - analyse(el: Object): void; - } +class ToolbarHelper { + analyse(el: Object): void; +} } interface JQuery { @@ -53375,7 +57896,7 @@ interface IgLayoutManagerGridLayout { /** * Specified whether the items should rearrange to fit in the container when it is resized. - * Have effect only when fixed columnWidth option is set. + * Have effect only when fixed columnWidth option is set. * */ rearrangeItems?: boolean; @@ -53407,7 +57928,7 @@ interface IgLayoutManagerItem { /** * Gets/Sets individual item height, either in px or percentage - * string The default height can be set in pixels (px), %, em and other units. + * string The default height can be set in pixels (px), %, em and other units. * */ height?: string; @@ -53426,7 +57947,7 @@ interface IgLayoutManagerItem { /** * Gets/Sets individual item width, either in px or percentage - * string The default width can be set in pixels (px), %, em and other units. + * string The default width can be set in pixels (px), %, em and other units. * */ width?: number; @@ -53538,23 +58059,23 @@ interface IgLayoutManager { /** * 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 + * 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 + * 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: @@ -53574,40 +58095,40 @@ interface IgLayoutManager { /** * Event fired after items are resized. - * Use ui.owner to get a reference to the layout manager performing resizing. + * 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. + * 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 + * 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 + * 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. + * Function takes arguments evt and ui. + * Use ui.owner to get reference to the igLayoutManager. */ rendered?: RenderedEvent; @@ -53619,7 +58140,7 @@ interface IgLayoutManager { 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. + * 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. @@ -53629,9 +58150,9 @@ interface IgLayoutManagerMethods { /** * 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. + * 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; } @@ -53701,24 +58222,24 @@ interface JQuery { /** * 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 + * 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 + * 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. @@ -53727,22 +58248,22 @@ interface JQuery { /** * 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 + * 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 + * 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. @@ -53765,13 +58286,13 @@ interface JQuery { /** * Event fired after items are resized. - * Use ui.owner to get a reference to the layout manager performing resizing. + * 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. + * Use ui.owner to get a reference to the layout manager performing resizing. * * @optionValue Define event handler function. */ @@ -53779,7 +58300,7 @@ interface JQuery { /** * Event fired before items are resized. - * Use ui.owner to get a reference to the layout manager performing resizing. + * Use ui.owner to get a reference to the layout manager performing resizing. */ igLayoutManager(optionLiteral: 'option', optionName: "internalResizing"): InternalResizingEvent; @@ -53947,8 +58468,8 @@ interface IgLinearGauge { * Gets or sets the orientation of the scale. * * Valid values: - * "horizontal" - * "vertical" + * "horizontal" The scale has a horizontal orientation. + * "vertical" The scale has a vertical orientation. */ orientation?: string; @@ -53983,11 +58504,11 @@ interface IgLinearGauge { * Gets or sets the shape to use when rendering the needle from a number of options. * * Valid values: - * "custom" - * "rectangle" - * "triangle" - * "needle" - * "trapezoid" + * "custom" A custom user defined needle shape. + * "rectangle" A needle shaped like a rectangle. + * "triangle" A needle shaped like a triangle. + * "needle" A needle shaped like a needle. + * "trapezoid" A needle shaped like a trapezoid. */ needleShape?: string; @@ -54256,10 +58777,36 @@ interface IgLinearGauge { font?: string; /** - * Gets or sets the pixel scaling ratio for the gauge. + * Gets or sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ pixelScalingRatio?: number; + + /** + * Event which is raised when a label of the the gauge is formatted. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of the gauge scale. + * Use ui.value to obtain the value on the the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + */ formatLabel?: FormatLabelEvent; + + /** + * Event which is raised when a label of the linear gauge is aligned along the scale. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of the gauge scale. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the gauge scale. + * Use ui.offsetY to obtain the Y offset of the label on the gauge scale. + */ alignLabel?: AlignLabelEvent; /** @@ -55128,30 +59675,74 @@ interface JQuery { igLinearGauge(optionLiteral: 'option', optionName: "font", optionValue: string): void; /** - * Gets the pixel scaling ratio for the gauge. + * Gets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ igLinearGauge(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; /** - * Sets the pixel scaling ratio for the gauge. + * Sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. * * @optionValue New value to be set. */ igLinearGauge(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; /** + * Event which is raised when a label of the the gauge is formatted. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of the gauge scale. + * Use ui.value to obtain the value on the the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. */ igLinearGauge(optionLiteral: 'option', optionName: "formatLabel"): FormatLabelEvent; /** + * Event which is raised when a label of the the gauge is formatted. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of the gauge scale. + * Use ui.value to obtain the value on the the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * + * @optionValue Define event handler function. */ igLinearGauge(optionLiteral: 'option', optionName: "formatLabel", optionValue: FormatLabelEvent): void; /** + * Event which is raised when a label of the linear gauge is aligned along the scale. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of the gauge scale. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the gauge scale. + * Use ui.offsetY to obtain the Y offset of the label on the gauge scale. */ igLinearGauge(optionLiteral: 'option', optionName: "alignLabel"): AlignLabelEvent; /** + * Event which is raised when a label of the linear gauge is aligned along the scale. + * Function takes first argument evt and second argument ui. + * Use ui.owner to obtain reference to the gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of the gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of the gauge scale. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the gauge scale. + * Use ui.offsetY to obtain the Y offset of the label on the gauge scale. + * + * @optionValue Define event handler function. */ igLinearGauge(optionLiteral: 'option', optionName: "alignLabel", optionValue: AlignLabelEvent): void; @@ -55211,7 +59802,9 @@ interface IgMapBackgroundContent { parameter?: string; /** - * Gets or sets the map tile image uri. This is a bing maps specific option + * Gets or sets the map tile image uri. + * For Bing Maps this is populated by bing imagery. + * For Open Street Map this option can accept custom URL for the tiles. Default is: 'tile.openstreetmap.org/{Z}/{X}/{Y}.png'. No protocol set means that 'http://' or 'https://' will be prepended automatically depending on the hosting site protocol. {Z} - denotes tile zoom, {X} - denotes tile horizontal position, {Y} - denotes tile vertical position. */ tilePath?: string; @@ -56301,7 +60894,7 @@ interface IgMapMethods { /** * 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. + * 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. @@ -56310,7 +60903,7 @@ interface IgMapMethods { /** * 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. + * 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. @@ -56456,27 +61049,27 @@ interface ShapeDataSourceSettings { } declare namespace Infragistics { - class ShapeDataSource { - constructor(settings: ShapeDataSourceSettings); +class ShapeDataSource { + constructor(settings: ShapeDataSourceSettings); - /** - * Loads to the current data source - */ - dataBind(): void; + /** + * Loads to the current data source + */ + dataBind(): void; - /** - * Returns true if data is loaded - */ - isBound(): boolean; + /** + * Returns true if data is loaded + */ + isBound(): boolean; - /** - * Returns the current converter instance - */ - converter(): Object; - } + /** + * Returns the current converter instance + */ + converter(): Object; +} } interface IgniteUIStatic { - ShapeDataSource: typeof Infragistics.ShapeDataSource; +ShapeDataSource: typeof Infragistics.ShapeDataSource; } interface TriangulationDataSourceSettings { @@ -56512,27 +61105,27 @@ interface TriangulationDataSourceSettings { } declare namespace Infragistics { - class TriangulationDataSource { - constructor(settings: TriangulationDataSourceSettings); +class TriangulationDataSource { + constructor(settings: TriangulationDataSourceSettings); - /** - * Loads to the current data source - */ - dataBind(): void; + /** + * Loads to the current data source + */ + dataBind(): void; - /** - * Returns true if data is loaded - */ - isBound(): boolean; + /** + * Returns true if data is loaded + */ + isBound(): boolean; - /** - * Returns the current converter instance - */ - converter(): Object; - } + /** + * Returns the current converter instance + */ + converter(): Object; +} } interface IgniteUIStatic { - TriangulationDataSource: typeof Infragistics.TriangulationDataSource; +TriangulationDataSource: typeof Infragistics.TriangulationDataSource; } interface JQuery { @@ -57661,7 +62254,7 @@ interface IgNotifier { * 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 + * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.igpopover#options:directionPriority) property * "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 @@ -57669,6 +62262,12 @@ interface IgNotifier { */ direction?: string; + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + */ + directionPriority?: any[]; + /** * 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 * @@ -57712,41 +62311,21 @@ interface IgNotifier { /** * 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; @@ -58052,6 +62631,20 @@ interface JQuery { */ igNotifier(optionLiteral: 'option', optionName: "direction", optionValue: string): void; + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + */ + igNotifier(optionLiteral: 'option', optionName: "directionPriority"): any[]; + + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + * + * @optionValue New value to be set. + */ + igNotifier(optionLiteral: 'option', optionName: "directionPriority", optionValue: any[]): 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 */ @@ -58138,21 +62731,11 @@ interface JQuery { /** * 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. */ @@ -58160,21 +62743,11 @@ interface JQuery { /** * 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. */ @@ -58182,21 +62755,11 @@ interface JQuery { /** * 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. */ @@ -58204,21 +62767,11 @@ interface JQuery { /** * 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. */ @@ -60121,7 +64674,7 @@ interface IgPivotGridDragAndDropSettings { appendTo?: any; /** - * Specifies the containment for the drag helper. The area inside of which the helper is contained would be scrollable while dragging. + * 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; @@ -62555,9 +67108,9 @@ interface IgPivotViewMethods { /** * 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. + * 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; } @@ -62676,7 +67229,7 @@ interface IgPopover { * 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 + * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.igpopover#options:directionPriority) property * "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 @@ -62684,6 +67237,12 @@ interface IgPopover { */ direction?: string; + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + */ + directionPriority?: any[]; + /** * 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 * @@ -62771,41 +67330,21 @@ interface IgPopover { /** * 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; @@ -62912,6 +67451,20 @@ interface JQuery { */ igPopover(optionLiteral: 'option', optionName: "direction", optionValue: string): void; + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + */ + igPopover(optionLiteral: 'option', optionName: "directionPriority"): any[]; + + /** + * Controls the priority in which the control searches for space to show relative to the target element. + * This property has effect only if the [direction](ui.igpopover#options:direction) property value is "auto" or unset. + * + * @optionValue New value to be set. + */ + igPopover(optionLiteral: 'option', optionName: "directionPriority", optionValue: any[]): 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 */ @@ -63072,21 +67625,11 @@ interface JQuery { /** * 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. */ @@ -63094,21 +67637,11 @@ interface JQuery { /** * 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. */ @@ -63116,21 +67649,11 @@ interface JQuery { /** * 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. */ @@ -63138,21 +67661,11 @@ interface JQuery { /** * 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. */ @@ -63297,8 +67810,8 @@ interface IgRadialGauge { * Gets or sets the direction in which the scale sweeps around the center from the start angle to end angle. * * Valid values: - * "counterclockwise" - * "clockwise" + * "counterclockwise" In a direction opposite the typical forward movement of the hands of a clock. + * "clockwise" In a direction corresponding to the typical forward movement of the hands of a clock. */ scaleSweepDirection?: string; @@ -63338,15 +67851,15 @@ interface IgRadialGauge { * 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" + * "none" No shape. + * "rectangle" A rectangle shape. + * "triangle" A triangle shape. + * "needle" A needle shape. + * "trapezoid" A trapezoid shape. + * "rectangleWithBulb" A rectangle shape with a bulb at the end. + * "triangleWithBulb" A triangle shape with a bulb at the end. + * "needleWithBulb" A needle shape with a bulb at the end. + * "trapezoidWithBulb" A trapezoid shape with a bulb at the end. */ needleShape?: string; @@ -63363,13 +67876,13 @@ interface IgRadialGauge { 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. + * 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, namely: NeedleWithBulb, RectangleWithBulb, TrapezoidWithBulb, and TriangleWithBulb. * 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. + * 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, namely: NeedleWithBulb, RectangleWithBulb, TrapezoidWithBulb, and TriangleWithBulb. * Values further from zero than 1 can be used to make this extend further than the normal radius of the gauge. */ needleBaseFeatureExtent?: number; @@ -63401,13 +67914,13 @@ interface IgRadialGauge { * Gets or sets the shape to use for the needle cap. * * Valid values: - * "none" - * "circle" - * "circleWithHole" - * "circleOverlay" - * "circleOverlayWithHole" - * "circleUnderlay" - * "circleUnderlayWithHole" + * "none" No pivot shape. + * "circle" A circle shaped pivot. + * "circleWithHole" A circle pivot with a hole in it. + * "circleOverlay" A circle pivot overlayed on top of the needle. + * "circleOverlayWithHole" A circle pivot with a hole in it overlayed on top of the needle. + * "circleUnderlay" A circle pivot rendered underneath the needle. + * "circleUnderlayWithHole" A circle pivot with a hold in it rendered underneath the needle. */ needlePivotShape?: string; @@ -63544,12 +68057,12 @@ interface IgRadialGauge { scaleOversweep?: number; /** - * Gets or sets the over or shape to use for the excess fill area for the scale. + * Gets or sets the oversweep shape to use for the excess fill area for the scale. * * Valid values: - * "auto" - * "circular" - * "fitted" + * "auto" A default oversweep shape. + * "circular" A circular oversweep shape. + * "fitted" A fitted oversweep shape. */ scaleOversweepShape?: string; @@ -63567,8 +68080,8 @@ interface IgRadialGauge { * Gets or sets the type of shape to use for the backing of the gauge. * * Valid values: - * "circular" - * "fitted" + * "circular" A circular backing shape. + * "fitted" A fitted backing shape. */ backingShape?: string; @@ -63583,10 +68096,10 @@ interface IgRadialGauge { * 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" + * "omitLast" Omit the last label. + * "omitFirst" Omit the first label. + * "omitNeither" Omit no labels. + * "omitBoth" Omit both labels. */ duplicateLabelOmissionStrategy?: string; @@ -63611,10 +68124,42 @@ interface IgRadialGauge { transitionProgress?: number; /** - * Gets or sets the scaling value used by the main canvas rendering context to apply a scale transform to it. + * Gets or sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ pixelScalingRatio?: number; + + /** + * Event which is raised when a label of the gauge is formatted. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of gauge scale. + * Use ui.startAngle to obtain the starting angle of gauge scale. + * Use ui.endAngle to obtain the ending angle of gauge scale. + * Use ui.angle to obtain the angle on the gauge scale at which the label will be located. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + */ formatLabel?: FormatLabelEvent; + + /** + * Event which is raised when a label of the gauge is aligned along the scale. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of gauge scale. + * Use ui.startAngle to obtain the starting angle of gauge scale. + * Use ui.endAngle to obtain the ending angle of gauge scale. + * Use ui.angle to obtain the angle on the gauge scale at which the label will be located. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the gauge scale. + * Use ui.offsetY to obtain the Y offset of the label on the gauge scale. + */ alignLabel?: AlignLabelEvent; /** @@ -64026,13 +68571,13 @@ interface JQuery { 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. + * 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, namely: NeedleWithBulb, RectangleWithBulb, TrapezoidWithBulb, and TriangleWithBulb. * 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. + * 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, namely: NeedleWithBulb, RectangleWithBulb, TrapezoidWithBulb, and TriangleWithBulb. * 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. @@ -64040,13 +68585,13 @@ interface JQuery { 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. + * 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, namely: NeedleWithBulb, RectangleWithBulb, TrapezoidWithBulb, and TriangleWithBulb. * 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. + * 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, namely: NeedleWithBulb, RectangleWithBulb, TrapezoidWithBulb, and TriangleWithBulb. * 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. @@ -64434,12 +68979,12 @@ interface JQuery { igRadialGauge(optionLiteral: 'option', optionName: "scaleOversweep", optionValue: number): void; /** - * Gets the over or shape to use for the excess fill area for the scale. + * Gets the oversweep 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. + * Sets the oversweep shape to use for the excess fill area for the scale. * * @optionValue New value to be set. */ @@ -64558,30 +69103,86 @@ interface JQuery { 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. + * Gets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ igRadialGauge(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; /** - * Sets the scaling value used by the main canvas rendering context to apply a scale transform to it. + * Sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. * * @optionValue New value to be set. */ igRadialGauge(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; /** + * Event which is raised when a label of the gauge is formatted. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of gauge scale. + * Use ui.startAngle to obtain the starting angle of gauge scale. + * Use ui.endAngle to obtain the ending angle of gauge scale. + * Use ui.angle to obtain the angle on the gauge scale at which the label will be located. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. */ igRadialGauge(optionLiteral: 'option', optionName: "formatLabel"): FormatLabelEvent; /** + * Event which is raised when a label of the gauge is formatted. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of gauge scale. + * Use ui.startAngle to obtain the starting angle of gauge scale. + * Use ui.endAngle to obtain the ending angle of gauge scale. + * Use ui.angle to obtain the angle on the gauge scale at which the label will be located. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * + * @optionValue Define event handler function. */ igRadialGauge(optionLiteral: 'option', optionName: "formatLabel", optionValue: FormatLabelEvent): void; /** + * Event which is raised when a label of the gauge is aligned along the scale. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of gauge scale. + * Use ui.startAngle to obtain the starting angle of gauge scale. + * Use ui.endAngle to obtain the ending angle of gauge scale. + * Use ui.angle to obtain the angle on the gauge scale at which the label will be located. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the gauge scale. + * Use ui.offsetY to obtain the Y offset of the label on the gauge scale. */ igRadialGauge(optionLiteral: 'option', optionName: "alignLabel"): AlignLabelEvent; /** + * Event which is raised when a label of the gauge is aligned along the scale. + * Function takes first argument null and second argument ui. + * Use ui.owner to obtain reference to gauge widget. + * Use ui.actualMinimumValue to obtain the minimum value of gauge scale. + * Use ui.actualMaximumValue to obtain the maximum value of gauge scale. + * Use ui.startAngle to obtain the starting angle of gauge scale. + * Use ui.endAngle to obtain the ending angle of gauge scale. + * Use ui.angle to obtain the angle on the gauge scale at which the label will be located. + * Use ui.value to obtain the value on the gauge scale associated with the label. + * Use ui.label to obtain the string value of the label. + * Use ui.width to obtain the width of the label. + * Use ui.height to obtain the height of the label. + * Use ui.offsetX to obtain the X offset of the label on the gauge scale. + * Use ui.offsetY to obtain the Y offset of the label on the gauge scale. + * + * @optionValue Define event handler function. */ igRadialGauge(optionLiteral: 'option', optionName: "alignLabel", optionValue: AlignLabelEvent): void; @@ -66042,40 +70643,798 @@ interface JQuery { igRating(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igRating(methodName: string, ...methodParams: any[]): any; } +interface IgSchedulerAgendaViewSettings { + /** + * Gets/Sets the number of days shown in AgendaView mode. + * + */ + dateRangeInterval?: number; + + /** + * Option for IgSchedulerAgendaViewSettings + */ + [optionName: string]: any; +} + +interface IgSchedulerMonthViewSettings { + /** + * Gets/Sets the type of content displayed in a MonthView day. + * + * auto Depending on the screen size, indicates square indicator mode for the appointment in the Month View, if scheduler size is larger than 768px, otherwise identifies horizontal one. + * indicator Indicates that a square indicator should be displayed. + * detailed Indicates that the subject should be displayed. + */ + appointmentMode?: string; + + /** + * Gets/Sets the visibility of an AgendaView in a MonthView. When true, the MonthView will display an AgendaView showing the Appointments for the currently selected day at the top of its list of Appointments. + * + */ + isAgendaVisible?: boolean; + + /** + * Gets/Sets the scope of appointments that are displayed in a MonthView's AgendaView. + * + * allAppointments Indicates that appointments for all days should be displayed in an AgendaView when it is a secondary view within a MonthView. + * onlyAppointmentsForSelectedMonthViewDay Indicates that only appointments for the day that is current selected in the associated MonthView should be displayed in an AgendaView that is associated with a MonthView as a secondary view. + */ + agendaVisibilityType?: string; + + /** + * Gets/Sets the orientation, which determines whether the MonthView and AgendaView views are split vertically or horizontally. This option can be used when the AgendaView is displayed in the MonthView. + * + * auto Depending on the screen size, identifies vertical split if scheduler size is larger than 768px, otherwise identifies horizontal one. + * vertical Identifies a vertical split between the Scheduler's views. + * horizontal Identifies a horizontal split between the Scheduler's views. + */ + viewSplitOrientation?: string; + + /** + * Gets/sets the visibility of the horizontal separators between weeks in the MonthView. + * + */ + isHorizontalSeparatorVisibile?: boolean; + + /** + * Gets/sets the visibility of the vertical separators between days of the week in a MonthView. + * + */ + isVerticalSeparatorVisibile?: boolean; + + /** + * Gets/sets the visibility of the weekday names in MonthView. + * + */ + isWeekdayVisible?: boolean; + + /** + * Gets/sets the visibility of the week numbers in a MonthView. + * + */ + isWeekNumberVisible?: boolean; + + /** + * Gets/sets the visibility of the days from the previous month that occur in the first week of a given month. + * + */ + isPreviousMonthShown?: boolean; + + /** + * Gets/sets the visibility of the days from the next month that occur in the last week of a given month. + * + */ + isNextMonthShown?: boolean; + + /** + * Option for IgSchedulerMonthViewSettings + */ + [optionName: string]: any; +} + +interface AgendaRangeChangingEvent { + (event: Event, ui: AgendaRangeChangingEventUIParam): void; +} + +interface AgendaRangeChangingEventUIParam { +} + +interface AgendaRangeChangedEvent { + (event: Event, ui: AgendaRangeChangedEventUIParam): void; +} + +interface AgendaRangeChangedEventUIParam { +} + +interface DaySelectedEvent { + (event: Event, ui: DaySelectedEventUIParam): void; +} + +interface DaySelectedEventUIParam { +} + +interface MonthChangingEvent { + (event: Event, ui: MonthChangingEventUIParam): void; +} + +interface MonthChangingEventUIParam { +} + +interface MonthChangedEvent { + (event: Event, ui: MonthChangedEventUIParam): void; +} + +interface MonthChangedEventUIParam { +} + +interface ViewChangingEvent { + (event: Event, ui: ViewChangingEventUIParam): void; +} + +interface ViewChangingEventUIParam { +} + +interface ViewChangedEvent { + (event: Event, ui: ViewChangedEventUIParam): void; +} + +interface ViewChangedEventUIParam { +} + +interface AppointmentDialogOpeningEvent { + (event: Event, ui: AppointmentDialogOpeningEventUIParam): void; +} + +interface AppointmentDialogOpeningEventUIParam { +} + +interface AppointmentDialogOpenedEvent { + (event: Event, ui: AppointmentDialogOpenedEventUIParam): void; +} + +interface AppointmentDialogOpenedEventUIParam { +} + +interface AppointmentDialogClosingEvent { + (event: Event, ui: AppointmentDialogClosingEventUIParam): void; +} + +interface AppointmentDialogClosingEventUIParam { +} + +interface AppointmentDialogClosedEvent { + (event: Event, ui: AppointmentDialogClosedEventUIParam): void; +} + +interface AppointmentDialogClosedEventUIParam { +} + +interface AppointmentCreatingEvent { + (event: Event, ui: AppointmentCreatingEventUIParam): void; +} + +interface AppointmentCreatingEventUIParam { +} + +interface AppointmentCreatedEvent { + (event: Event, ui: AppointmentCreatedEventUIParam): void; +} + +interface AppointmentCreatedEventUIParam { +} + +interface AppointmentDeletingEvent { + (event: Event, ui: AppointmentDeletingEventUIParam): void; +} + +interface AppointmentDeletingEventUIParam { +} + +interface AppointmentDeletedEvent { + (event: Event, ui: AppointmentDeletedEventUIParam): void; +} + +interface AppointmentDeletedEventUIParam { +} + +interface AppointmentEditingEvent { + (event: Event, ui: AppointmentEditingEventUIParam): void; +} + +interface AppointmentEditingEventUIParam { +} + +interface AppointmentEditedEvent { + (event: Event, ui: AppointmentEditedEventUIParam): void; +} + +interface AppointmentEditedEventUIParam { +} + +interface IgScheduler { + /** + * Lists of all the views, rendered in the Scheduler. + * + */ + views?: any[]; + + /** + * Gets/Sets current view mode in the Scheduler. If this options is not defined, then the first defined view in the views property is taken. + * + * + * Valid values: + * "monthView" Enables MonthView in the Scheduler. + * "agendaView" Enables AgendaView in the Scheduler. + */ + viewMode?: string; + + /** + * Enables/Disables today button. + * + */ + selectedDate?: 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 AgendaView settings. + * + */ + agendaViewSettings?: IgSchedulerAgendaViewSettings; + + /** + * Gets/Sets MonthView settings. + * + */ + monthViewSettings?: IgSchedulerMonthViewSettings; + + /** + * Gets/Sets whether the appointment dialog and the related day and appointment popups should be shown. + * + */ + appointmentDialogSuppress?: boolean; + + /** + * Fired before agenda view range is changed when using previous and next buttons (fired only in Agenda View) + */ + agendaRangeChanging?: AgendaRangeChangingEvent; + + /** + * Fired after agenda view range is changed when using previous and next buttons (fired only in Agenda View) + */ + agendaRangeChanged?: AgendaRangeChangedEvent; + + /** + * Fired when a day is selected from the datepicker calendar. + */ + daySelected?: DaySelectedEvent; + + /** + * Fired before changing the month begins, when using previous and next buttons (fired only in Month View) + */ + monthChanging?: MonthChangingEvent; + + /** + * Fired after month is changed when using previous and next buttons (fired only in Month View) + */ + monthChanged?: MonthChangedEvent; + + /** + * Fired before rendering of the scheduler begins. + */ + rendering?: RenderingEvent; + + /** + * Fired after rendering of the scheduler has finished. + */ + rendered?: RenderedEvent; + + /** + * Fired before the view is changed, when using the menu buttons. + */ + viewChanging?: ViewChangingEvent; + + /** + * Fired after the view is changed, when using the menu buttons. + */ + viewChanged?: ViewChangedEvent; + + /** + * Fired before opening the dialog for creating/editing appointment. + */ + appointmentDialogOpening?: AppointmentDialogOpeningEvent; + + /** + * Fired after opening the dialog for creating/editing appointment. + */ + appointmentDialogOpened?: AppointmentDialogOpenedEvent; + + /** + * Fired before closing the dialog for adding/editing appointment. + */ + appointmentDialogClosing?: AppointmentDialogClosingEvent; + + /** + * Fired after closing the dialog window for adding/editing appointment. + */ + appointmentDialogClosed?: AppointmentDialogClosedEvent; + + /** + * Fired before an appointment is created. + */ + appointmentCreating?: AppointmentCreatingEvent; + + /** + * Fired after an appointment is created. + */ + appointmentCreated?: AppointmentCreatedEvent; + + /** + * Fired before an appointment is deleted. + */ + appointmentDeleting?: AppointmentDeletingEvent; + + /** + * Fired after an appointment is deleted. + */ + appointmentDeleted?: AppointmentDeletedEvent; + + /** + * Fired before an appointment is edited. + */ + appointmentEditing?: AppointmentEditingEvent; + + /** + * Fired after an appointment is edited. + */ + appointmentEdited?: AppointmentEditedEvent; + + /** + * Option for igScheduler + */ + [optionName: string]: any; +} +interface IgSchedulerMethods { + /** + * Gets reference to appointment by id + * + * @param id + */ + getAppointmentById(id: Object): Object; + + /** + * Creates a new appointment and renders it to the scheduler + * + * @param appointment + */ + createAppointment(appointment: Object): Object; + + /** + * Deletes appointment from the appointment collection + * + * @param appointment appointment + */ + deleteAppointment(appointment: Object): Object; + + /** + * Deletes appointment from the appointment collection + * + * @param appointment appointment + * @param updateAppoinment updateAppoinment + */ + editAppointment(appointment: Object, updateAppoinment: Object): Object; + + /** + * Destroys the widget + */ + destroy(): void; + + /** + * Gets reference to the today UI button. + */ + todayButton(): string; + + /** + * Gets reference to the previous UI button. + */ + previousButton(): string; + + /** + * Gets reference to the date range UI button. + */ + dateRangeButton(): string; + + /** + * Gets reference to the next UI button. + */ + nextButton(): string; + + /** + * Gets reference to the jQuery calendar UI control. + */ + getCalendar(): string; +} +interface JQuery { + data(propertyName: "igScheduler"): IgSchedulerMethods; +} + +interface JQuery { + igScheduler(methodName: "getAppointmentById", id: Object): Object; + igScheduler(methodName: "createAppointment", appointment: Object): Object; + igScheduler(methodName: "deleteAppointment", appointment: Object): Object; + igScheduler(methodName: "editAppointment", appointment: Object, updateAppoinment: Object): Object; + igScheduler(methodName: "destroy"): void; + igScheduler(methodName: "todayButton"): string; + igScheduler(methodName: "previousButton"): string; + igScheduler(methodName: "dateRangeButton"): string; + igScheduler(methodName: "nextButton"): string; + igScheduler(methodName: "getCalendar"): string; + + /** + * Lists of all the views, rendered in the Scheduler. + * + */ + igScheduler(optionLiteral: 'option', optionName: "views"): any[]; + + /** + * Lists of all the views, rendered in the Scheduler. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "views", optionValue: any[]): void; + + /** + * Gets/Sets current view mode in the Scheduler. If this options is not defined, then the first defined view in the views property is taken. + * + */ + igScheduler(optionLiteral: 'option', optionName: "viewMode"): string; + + /** + * /Sets current view mode in the Scheduler. If this options is not defined, then the first defined view in the views property is taken. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "viewMode", optionValue: string): void; + + /** + * Enables/Disables today button. + * + */ + igScheduler(optionLiteral: 'option', optionName: "selectedDate"): boolean; + + /** + * Enables/Disables today button. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "selectedDate", optionValue: boolean): void; + + /** + * Gets/Sets the width of the control. + * + */ + igScheduler(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets the height of the control. + * + */ + igScheduler(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets the height of the control. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets/Sets AgendaView settings. + * + */ + igScheduler(optionLiteral: 'option', optionName: "agendaViewSettings"): IgSchedulerAgendaViewSettings; + + /** + * /Sets AgendaView settings. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "agendaViewSettings", optionValue: IgSchedulerAgendaViewSettings): void; + + /** + * Gets/Sets MonthView settings. + * + */ + igScheduler(optionLiteral: 'option', optionName: "monthViewSettings"): IgSchedulerMonthViewSettings; + + /** + * /Sets MonthView settings. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "monthViewSettings", optionValue: IgSchedulerMonthViewSettings): void; + + /** + * Gets/Sets whether the appointment dialog and the related day and appointment popups should be shown. + * + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogSuppress"): boolean; + + /** + * /Sets whether the appointment dialog and the related day and appointment popups should be shown. + * + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogSuppress", optionValue: boolean): void; + + /** + * Fired before agenda view range is changed when using previous and next buttons (fired only in Agenda View) + */ + igScheduler(optionLiteral: 'option', optionName: "agendaRangeChanging"): AgendaRangeChangingEvent; + + /** + * Fired before agenda view range is changed when using previous and next buttons (fired only in Agenda View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "agendaRangeChanging", optionValue: AgendaRangeChangingEvent): void; + + /** + * Fired after agenda view range is changed when using previous and next buttons (fired only in Agenda View) + */ + igScheduler(optionLiteral: 'option', optionName: "agendaRangeChanged"): AgendaRangeChangedEvent; + + /** + * Fired after agenda view range is changed when using previous and next buttons (fired only in Agenda View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "agendaRangeChanged", optionValue: AgendaRangeChangedEvent): void; + + /** + * Fired when a day is selected from the datepicker calendar. + */ + igScheduler(optionLiteral: 'option', optionName: "daySelected"): DaySelectedEvent; + + /** + * Fired when a day is selected from the datepicker calendar. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "daySelected", optionValue: DaySelectedEvent): void; + + /** + * Fired before changing the month begins, when using previous and next buttons (fired only in Month View) + */ + igScheduler(optionLiteral: 'option', optionName: "monthChanging"): MonthChangingEvent; + + /** + * Fired before changing the month begins, when using previous and next buttons (fired only in Month View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "monthChanging", optionValue: MonthChangingEvent): void; + + /** + * Fired after month is changed when using previous and next buttons (fired only in Month View) + */ + igScheduler(optionLiteral: 'option', optionName: "monthChanged"): MonthChangedEvent; + + /** + * Fired after month is changed when using previous and next buttons (fired only in Month View) + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "monthChanged", optionValue: MonthChangedEvent): void; + + /** + * Fired before rendering of the scheduler begins. + */ + igScheduler(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Fired before rendering of the scheduler begins. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Fired after rendering of the scheduler has finished. + */ + igScheduler(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Fired after rendering of the scheduler has finished. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Fired before the view is changed, when using the menu buttons. + */ + igScheduler(optionLiteral: 'option', optionName: "viewChanging"): ViewChangingEvent; + + /** + * Fired before the view is changed, when using the menu buttons. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "viewChanging", optionValue: ViewChangingEvent): void; + + /** + * Fired after the view is changed, when using the menu buttons. + */ + igScheduler(optionLiteral: 'option', optionName: "viewChanged"): ViewChangedEvent; + + /** + * Fired after the view is changed, when using the menu buttons. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "viewChanged", optionValue: ViewChangedEvent): void; + + /** + * Fired before opening the dialog for creating/editing appointment. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogOpening"): AppointmentDialogOpeningEvent; + + /** + * Fired before opening the dialog for creating/editing appointment. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogOpening", optionValue: AppointmentDialogOpeningEvent): void; + + /** + * Fired after opening the dialog for creating/editing appointment. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogOpened"): AppointmentDialogOpenedEvent; + + /** + * Fired after opening the dialog for creating/editing appointment. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogOpened", optionValue: AppointmentDialogOpenedEvent): void; + + /** + * Fired before closing the dialog for adding/editing appointment. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogClosing"): AppointmentDialogClosingEvent; + + /** + * Fired before closing the dialog for adding/editing appointment. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogClosing", optionValue: AppointmentDialogClosingEvent): void; + + /** + * Fired after closing the dialog window for adding/editing appointment. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogClosed"): AppointmentDialogClosedEvent; + + /** + * Fired after closing the dialog window for adding/editing appointment. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDialogClosed", optionValue: AppointmentDialogClosedEvent): void; + + /** + * Fired before an appointment is created. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentCreating"): AppointmentCreatingEvent; + + /** + * Fired before an appointment is created. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentCreating", optionValue: AppointmentCreatingEvent): void; + + /** + * Fired after an appointment is created. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentCreated"): AppointmentCreatedEvent; + + /** + * Fired after an appointment is created. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentCreated", optionValue: AppointmentCreatedEvent): void; + + /** + * Fired before an appointment is deleted. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDeleting"): AppointmentDeletingEvent; + + /** + * Fired before an appointment is deleted. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDeleting", optionValue: AppointmentDeletingEvent): void; + + /** + * Fired after an appointment is deleted. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDeleted"): AppointmentDeletedEvent; + + /** + * Fired after an appointment is deleted. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentDeleted", optionValue: AppointmentDeletedEvent): void; + + /** + * Fired before an appointment is edited. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentEditing"): AppointmentEditingEvent; + + /** + * Fired before an appointment is edited. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentEditing", optionValue: AppointmentEditingEvent): void; + + /** + * Fired after an appointment is edited. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentEdited"): AppointmentEditedEvent; + + /** + * Fired after an appointment is edited. + * + * @optionValue New value to be set. + */ + igScheduler(optionLiteral: 'option', optionName: "appointmentEdited", optionValue: AppointmentEditedEvent): void; + igScheduler(options: IgScheduler): JQuery; + igScheduler(optionLiteral: 'option', optionName: string): any; + igScheduler(optionLiteral: 'option', options: IgScheduler): JQuery; + igScheduler(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igScheduler(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 { @@ -66083,25 +71442,6 @@ interface ScrolledEvent { } 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 { @@ -66109,15 +71449,6 @@ interface ThumbDragStartEvent { } 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 { @@ -66125,25 +71456,6 @@ interface ThumbDragMoveEvent { } 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 { @@ -66151,15 +71463,28 @@ interface ThumbDragEndEvent { } interface ThumbDragEndEventUIParam { +} + +interface ResizingEvent { + (event: Event, ui: ResizingEventUIParam): void; +} + +interface ResizingEventUIParam { /** * Used to obtain reference to igScroll. */ owner?: any; +} +interface ResizedEvent { + (event: Event, ui: ResizedEventUIParam): void; +} + +interface ResizedEventUIParam { /** - * Used to obtain which scrollbar thumb is being used - horizontal(true) or vertical(false). + * Used to obtain reference to igScroll. */ - horizontal?: any; + owner?: any; } interface IgScroll { @@ -66326,66 +71651,50 @@ interface IgScroll { /** * 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. + */ + thumbDragEnd?: ThumbDragEndEvent; + + /** + * Event which is raised when the igScroll detects that the element is reizing. * 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; + resizing?: ResizingEvent; + + /** + * Event which is raised after the igScroll has finished resizing. + * 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. + */ + resized?: ResizedEvent; /** * Option for igScroll @@ -66772,17 +72081,11 @@ interface JQuery { /** * 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. */ @@ -66791,28 +72094,12 @@ interface JQuery { /** * 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. */ @@ -66820,23 +72107,11 @@ interface JQuery { /** * 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. */ @@ -66844,19 +72119,11 @@ interface JQuery { /** * 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. */ @@ -66864,25 +72131,11 @@ interface JQuery { /** * 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. */ @@ -66890,23 +72143,51 @@ interface JQuery { /** * 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; + + /** + * Event which is raised when the igScroll detects that the element is reizing. + * 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: "resizing"): ResizingEvent; + + /** + * Event which is raised when the igScroll detects that the element is reizing. + * 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: "resizing", optionValue: ResizingEvent): void; + + /** + * Event which is raised after the igScroll has finished resizing. + * 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: "resized"): ResizedEvent; + + /** + * Event which is raised after the igScroll has finished resizing. + * 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: "resized", optionValue: ResizedEvent): void; igScroll(options: IgScroll): JQuery; igScroll(optionLiteral: 'option', optionName: string): any; igScroll(optionLiteral: 'option', options: IgScroll): JQuery; @@ -67863,8 +73144,8 @@ interface IgSparkline { * Gets or sets the display state of the horizontal axis. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ horizontalAxisVisibility?: string; @@ -67872,8 +73153,8 @@ interface IgSparkline { * Gets or sets the display state of the vertical axis. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ verticalAxisVisibility?: string; @@ -67881,8 +73162,8 @@ interface IgSparkline { * Gets or sets the marker visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ markerVisibility?: string; @@ -67890,8 +73171,8 @@ interface IgSparkline { * Gets or sets the negative marker visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ negativeMarkerVisibility?: string; @@ -67899,8 +73180,8 @@ interface IgSparkline { * Gets or sets the first marker visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ firstMarkerVisibility?: string; @@ -67908,8 +73189,8 @@ interface IgSparkline { * Gets or sets the last marker visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ lastMarkerVisibility?: string; @@ -67917,8 +73198,8 @@ interface IgSparkline { * Gets or sets the low marker visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ lowMarkerVisibility?: string; @@ -67926,8 +73207,8 @@ interface IgSparkline { * Gets or sets the high marker visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ highMarkerVisibility?: string; @@ -67935,8 +73216,8 @@ interface IgSparkline { * Gets or sets the normal range visibility of the sparkline. * * Valid values: - * "visible" - * "collapsed" + * "visible" Display the element. + * "collapsed" Do not display the element. */ normalRangeVisibility?: string; @@ -67994,20 +73275,20 @@ interface IgSparkline { * 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" + * "none" No trend line will be displayed. + * "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; @@ -68046,8 +73327,8 @@ interface IgSparkline { * Gets or sets the way null values are interpreted. * * Valid values: - * "linearInterpolate" - * "dontPlot" + * "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; @@ -68067,6 +73348,12 @@ interface IgSparkline { * 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 scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. + */ pixelScalingRatio?: number; /** @@ -68216,7 +73503,7 @@ interface IgSparklineMethods { /** * 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. + * 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. */ @@ -68224,7 +73511,7 @@ interface IgSparklineMethods { /** * 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. + * 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. @@ -68234,7 +73521,7 @@ interface IgSparklineMethods { /** * 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. + * 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. @@ -68251,6 +73538,11 @@ interface IgSparklineMethods { * Binds data to the chart */ dataBind(): void; + + /** + * Forces any pending deferred work to render on the chart before continuing + */ + flush(): void; } interface JQuery { data(propertyName: "igSparkline"): IgSparklineMethods; @@ -68271,6 +73563,7 @@ interface JQuery { igSparkline(methodName: "notifyRemoveItem", dataSource: Object, index: number, oldItem: Object): Object; igSparkline(methodName: "chart"): Object; igSparkline(methodName: "dataBind"): void; + igSparkline(methodName: "flush"): void; /** * The width of the sparkline. It can be set as a number in pixels, string (px) or percentage (%). @@ -68793,10 +74086,18 @@ interface JQuery { igSparkline(optionLiteral: 'option', optionName: "formatLabel", optionValue: any): void; /** + * Gets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. */ igSparkline(optionLiteral: 'option', optionName: "pixelScalingRatio"): number; /** + * Sets the scaling value used to affect the pixel density of the control. + * A higher scaling ratio will produce crisper visuals at the expense of memory. Lower values will cause the control + * to appear blurry. + * + * @optionValue New value to be set. */ igSparkline(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; @@ -69307,17 +74608,6 @@ interface ResizeStartedEventUIParam { 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; } @@ -69749,6 +75039,762 @@ interface JQuery { igSplitter(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igSplitter(methodName: string, ...methodParams: any[]): any; } +interface ActivePaneChangedEvent { + (event: Event, ui: ActivePaneChangedEventUIParam): void; +} + +interface ActivePaneChangedEventUIParam { +} + +interface ActiveWorksheetChangedEvent { + (event: Event, ui: ActiveWorksheetChangedEventUIParam): void; +} + +interface ActiveWorksheetChangedEventUIParam { +} + +interface EditRangePasswordNeededEvent { + (event: Event, ui: EditRangePasswordNeededEventUIParam): void; +} + +interface EditRangePasswordNeededEventUIParam { +} + +interface HyperlinkExecutingEvent { + (event: Event, ui: HyperlinkExecutingEventUIParam): void; +} + +interface HyperlinkExecutingEventUIParam { +} + +interface UserPromptDisplayingEvent { + (event: Event, ui: UserPromptDisplayingEventUIParam): void; +} + +interface UserPromptDisplayingEventUIParam { +} + +interface WorkbookDirtiedEvent { + (event: Event, ui: WorkbookDirtiedEventUIParam): void; +} + +interface WorkbookDirtiedEventUIParam { +} + +interface IgSpreadsheet { + /** + * The width of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) and percentage (%). + * "number" The widget width can be set as a number + */ + width?: string|number; + + /** + * The height of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * + * + * Valid values: + * "string" The widget height can be set in pixels (px) and percentage (%). + * "number" The widget height can be set as a number + */ + height?: string|number; + + /** + * Returns or sets the A1 format address of the current active cell within the selected worksheet. + * + */ + activeCell?: string; + + /** + * Returns or sets a boolean indicating whether the scroll lock key is toggled. + * This property is used when certain keys are pressed while the control has focus. For example + * if an arrow key is pressed while the scroll lock is enabled the cell area will be scrolled rather than changing + * the active cell. Note: This property is not maintained/changed by the control. It is just queried when + * performing actions that consider whether the scroll lock is enabled. + * + */ + isScrollLocked?: boolean; + + /** + * Returns or sets the Worksheet from the workbook whose content should be displayed within the control. + * + */ + activeWorksheet?: any; + + /** + * Returns or sets a boolean indicating whether the spreadsheet allows adding worksheets. + * + */ + allowAddWorksheet?: boolean; + + /** + * Returns or sets a boolean indicating whether the spreadsheet allows deleting worksheets. + * + */ + allowDeleteWorksheet?: boolean; + + /** + * Returns or sets a boolean indicating if the grid lines are displayed in the selected worksheets. + * + */ + areGridlinesVisible?: boolean; + + /** + * Returns or sets a boolean indicating if the row and column headers are displayed for the selected worksheets. + * + */ + areHeadersVisible?: boolean; + + /** + * Returns or sets an enumeration indicating the direction of the cell adjacent to the activeCell that should be activated when the enter key is pressed.This property is only used if the isEnterKeyNavigationEnabled is set to true. Also, the reverse direction is + * navigated when Shift + Enter are pressed. + * + * + * + * Valid values: + * "down" The cell below should be activated. + * "right" The cell to the right should be activated + * "up" The cell above should be activated. + * "left" The cell to the left should be activated + */ + enterKeyNavigationDirection?: string; + + /** + * Returns or sets a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. + * + */ + isEnterKeyNavigationEnabled?: boolean; + + /** + * Returns or sets a boolean indicating if the formula bar is displayed within the Spreadsheet. + * + */ + isFormulaBarVisible?: boolean; + + /** + * Returns or sets a boolean indicating whether the control is in "End mode". + * End mode is a mode that affects certain keyboard navigation such as navigating with the arrow keys. For example when in + * end mode and one presses the right arrow, the activeCell will be changed to be the first cell to the right of the current ActiveCell + * that has a value (even if the value is ""). If there were no cells to the right with a value then it would activate the right most cell in that row. End + * mode will end automatically such as when one presses an arrow key. + * + */ + isInEndMode?: boolean; + + /** + * Returns or sets a boolean indicating whether undo is enabled for the control. + * + */ + isUndoEnabled?: boolean; + + /** + * Returns or sets the width of the name box within the formula bar. + * + */ + nameBoxWidth?: number; + + /** + * Returns or sets a value indicating how the selection is updated when interacting with the cells via the mouse or keyboard. + * + * + * Valid values: + * "normal" The selection is replaced when dragging the mouse to select a cell or range of cells. Similarly when navigating via the keyboard a new selection is created. One may add a new range by holding the Ctrl key and using the mouse and one may alter the selection range containing the active cell by holding the Shift key down while clicking with the mouse or navigating with the keyboard such as with the arrow keys. + * "extendSelection" The selection range in the cellRanges representing the active cell is updated as one uses the mouse to select a cell or navigating via the keyboard. + * "addToSelection" New cell ranges are added to the cellRanges without needing to hold down the ctrl key when dragging via the mouse and a range is added with the first arrow key navigation after entering the mode. One can enter the mode by pressing Shift+F8. + */ + selectionMode?: string; + + /** + * Type="ig.excel.Worksheet[]" Returns or sets an array of the Worksheets whose tabs are selected. + * + */ + selectedWorksheets?: any; + + /** + * Returns or sets the position of the screen tip used to display the input message for the data validation rule associated with the active cell. + * + * The provided object should have numeric properties called x and y. + */ + validationInputMessagePosition?: any; + + /** + * Returns or sets the workbook whose information is displayed in the control. + * + */ + workbook?: any; + + /** + * Returns or sets the magnification of the selected worksheets. + * + */ + zoomLevel?: number; + + /** + * Invoked when an action is executed on the Spreadsheet. + */ + actionExecuted?: ActionExecutedEvent; + + /** + * Invoked when an action is about to be executed by the Spreadsheet. + */ + actionExecuting?: ActionExecutingEvent; + + /** + * Invoked when the activeCell of the Spreadsheet has changed. + */ + activeCellChanged?: ActiveCellChangedEvent; + + /** + * Invoked when the activePane of the Spreadsheet has changed. + */ + activePaneChanged?: ActivePaneChangedEvent; + + /** + * Invoked when the activeWorksheet of the Spreadsheet has changed. + */ + activeWorksheetChanged?: ActiveWorksheetChangedEvent; + + /** + * Invoked when the Spreadsheet is performing an operation on a protected Worksheet and there is a single range that may be unlocked to allow the operation to be performed. + */ + editRangePasswordNeeded?: EditRangePasswordNeededEvent; + + /** + * Invoked when a hyperlink is being followed in the Spreadsheet. + */ + hyperlinkExecuting?: HyperlinkExecutingEvent; + + /** + * Invoked when the selection for a ig.spreadsheet.SpreadsheetPane of the Spreadsheet is changed. + */ + selectionChanged?: SelectionChangedEvent; + + /** + * Invoked when the user will be prompted with a message regarding an operation that is being performed. + */ + userPromptDisplaying?: UserPromptDisplayingEvent; + + /** + * Invoked when a change has been made to the workbook that might require a save. + * Note: This event is invoked asynchronously with regards to the change(s) that + * have occurred. Also some changes alone are not considered to dirty the Workbook even though it + * does change state on the Workbook or one of its subobjects. An example of that would be a zoom + * type operation (e.g. changing the magnificationInNormalView). + */ + workbookDirtied?: WorkbookDirtiedEvent; + + /** + * Option for igSpreadsheet + */ + [optionName: string]: any; +} +interface IgSpreadsheetMethods { + /** + * Returns an object that represents the pane with the focus. + */ + getActivePane(): Object; + + /** + * Returns an object that represents the current selection of the active pane. + */ + getActiveSelection(): Object; + + /** + * Returns an object used to get the formatting of the activeCell and where modifications are applied to the entire active selection. + * Any changes made to this object will affect all the objects in the selection. So for example, the + * Font.Name may return "Arial" because the active cell has that as its resolved font name even though the other + * cells are using a different font but if you set the Font.Name of this object to "Arial" then all the objects + * affected by the selection will have their Font.Name updated to that value. + */ + getActiveSelectionCellRangeFormat(): Object; + + /** + * Returns a boolean indicating if the user is currently editing the name of the active worksheet. + */ + getIsRenamingWorksheet(): boolean; + + /** + * Returns an array of the panes for the activeWorksheet. + * + * returnType="ig.spreadsheet.SpreadsheetPane[]" + */ + getPanes(): void; + + /** + * Executes the action associated with the specified id. + * + * @param action An [enumeration](ig.spreadsheet.SpreadsheetAction) or string that identifies the action to execute. + */ + executeAction(action: Object): boolean; + + /** + * Forces any pending deferred work to render on the spreadsheet before continuing + */ + flush(): void; + + /** + * Destroys the widget. + */ + destroy(): void; + + /** + * Notify the spreadsheet that style information used for rendering the spreadsheet may have been updated. + */ + styleUpdated(): void; +} +interface JQuery { + data(propertyName: "igSpreadsheet"): IgSpreadsheetMethods; +} + +interface JQuery { + igSpreadsheet(methodName: "getActivePane"): Object; + igSpreadsheet(methodName: "getActiveSelection"): Object; + igSpreadsheet(methodName: "getActiveSelectionCellRangeFormat"): Object; + igSpreadsheet(methodName: "getIsRenamingWorksheet"): boolean; + igSpreadsheet(methodName: "getPanes"): void; + igSpreadsheet(methodName: "executeAction", action: Object): boolean; + igSpreadsheet(methodName: "flush"): void; + igSpreadsheet(methodName: "destroy"): void; + igSpreadsheet(methodName: "styleUpdated"): void; + + /** + * The width of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * The width of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * The height of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * The height of the spreadsheet. It can be set as a number in pixels, string (px) or percentage (%). + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Returns the A1 format address of the current active cell within the selected worksheet. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeCell"): string; + + /** + * Returns or sets the A1 format address of the current active cell within the selected worksheet. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeCell", optionValue: string): void; + + /** + * Returns a boolean indicating whether the scroll lock key is toggled. + * This property is used when certain keys are pressed while the control has focus. For example + * if an arrow key is pressed while the scroll lock is enabled the cell area will be scrolled rather than changing + * the active cell. Note: This property is not maintained/changed by the control. It is just queried when + * performing actions that consider whether the scroll lock is enabled. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isScrollLocked"): boolean; + + /** + * Returns or sets a boolean indicating whether the scroll lock key is toggled. + * This property is used when certain keys are pressed while the control has focus. For example + * if an arrow key is pressed while the scroll lock is enabled the cell area will be scrolled rather than changing + * the active cell. Note: This property is not maintained/changed by the control. It is just queried when + * performing actions that consider whether the scroll lock is enabled. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isScrollLocked", optionValue: boolean): void; + + /** + * Returns the Worksheet from the workbook whose content should be displayed within the control. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheet"): any; + + /** + * Returns or sets the Worksheet from the workbook whose content should be displayed within the control. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheet", optionValue: any): void; + + /** + * Returns a boolean indicating whether the spreadsheet allows adding worksheets. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "allowAddWorksheet"): boolean; + + /** + * Returns or sets a boolean indicating whether the spreadsheet allows adding worksheets. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "allowAddWorksheet", optionValue: boolean): void; + + /** + * Returns a boolean indicating whether the spreadsheet allows deleting worksheets. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "allowDeleteWorksheet"): boolean; + + /** + * Returns or sets a boolean indicating whether the spreadsheet allows deleting worksheets. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "allowDeleteWorksheet", optionValue: boolean): void; + + /** + * Returns a boolean indicating if the grid lines are displayed in the selected worksheets. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "areGridlinesVisible"): boolean; + + /** + * Returns or sets a boolean indicating if the grid lines are displayed in the selected worksheets. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "areGridlinesVisible", optionValue: boolean): void; + + /** + * Returns a boolean indicating if the row and column headers are displayed for the selected worksheets. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "areHeadersVisible"): boolean; + + /** + * Returns or sets a boolean indicating if the row and column headers are displayed for the selected worksheets. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "areHeadersVisible", optionValue: boolean): void; + + /** + * Returns an enumeration indicating the direction of the cell adjacent to the activeCell that should be activated when the enter key is pressed.This property is only used if the isEnterKeyNavigationEnabled is set to true. Also, the reverse direction is + * navigated when Shift + Enter are pressed. + * + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "enterKeyNavigationDirection"): string; + + /** + * Returns or sets an enumeration indicating the direction of the cell adjacent to the activeCell that should be activated when the enter key is pressed.This property is only used if the isEnterKeyNavigationEnabled is set to true. Also, the reverse direction is + * navigated when Shift + Enter are pressed. + * + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "enterKeyNavigationDirection", optionValue: string): void; + + /** + * Returns a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isEnterKeyNavigationEnabled"): boolean; + + /** + * Returns or sets a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isEnterKeyNavigationEnabled", optionValue: boolean): void; + + /** + * Returns a boolean indicating if the formula bar is displayed within the Spreadsheet. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isFormulaBarVisible"): boolean; + + /** + * Returns or sets a boolean indicating if the formula bar is displayed within the Spreadsheet. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isFormulaBarVisible", optionValue: boolean): void; + + /** + * Returns a boolean indicating whether the control is in "End mode". + * End mode is a mode that affects certain keyboard navigation such as navigating with the arrow keys. For example when in + * end mode and one presses the right arrow, the activeCell will be changed to be the first cell to the right of the current ActiveCell + * that has a value (even if the value is ""). If there were no cells to the right with a value then it would activate the right most cell in that row. End + * mode will end automatically such as when one presses an arrow key. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isInEndMode"): boolean; + + /** + * Returns or sets a boolean indicating whether the control is in "End mode". + * End mode is a mode that affects certain keyboard navigation such as navigating with the arrow keys. For example when in + * end mode and one presses the right arrow, the activeCell will be changed to be the first cell to the right of the current ActiveCell + * that has a value (even if the value is ""). If there were no cells to the right with a value then it would activate the right most cell in that row. End + * mode will end automatically such as when one presses an arrow key. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isInEndMode", optionValue: boolean): void; + + /** + * Returns a boolean indicating whether undo is enabled for the control. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isUndoEnabled"): boolean; + + /** + * Returns or sets a boolean indicating whether undo is enabled for the control. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isUndoEnabled", optionValue: boolean): void; + + /** + * Returns the width of the name box within the formula bar. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "nameBoxWidth"): number; + + /** + * Returns or sets the width of the name box within the formula bar. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "nameBoxWidth", optionValue: number): void; + + /** + * Returns a value indicating how the selection is updated when interacting with the cells via the mouse or keyboard. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "selectionMode"): string; + + /** + * Returns or sets a value indicating how the selection is updated when interacting with the cells via the mouse or keyboard. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "selectionMode", optionValue: string): void; + + /** + * Type="ig.excel.Worksheet[]" Returns an array of the Worksheets whose tabs are selected. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "selectedWorksheets"): any; + + /** + * Type="ig.excel.Worksheet[]" Returns or sets an array of the Worksheets whose tabs are selected. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "selectedWorksheets", optionValue: any): void; + + /** + * Returns the position of the screen tip used to display the input message for the data validation rule associated with the active cell. + * + * The provided object should have numeric properties called x and y. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "validationInputMessagePosition"): any; + + /** + * Returns or sets the position of the screen tip used to display the input message for the data validation rule associated with the active cell. + * + * The provided object should have numeric properties called x and y. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "validationInputMessagePosition", optionValue: any): void; + + /** + * Returns the workbook whose information is displayed in the control. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "workbook"): any; + + /** + * Returns or sets the workbook whose information is displayed in the control. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "workbook", optionValue: any): void; + + /** + * Returns the magnification of the selected worksheets. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "zoomLevel"): number; + + /** + * Returns or sets the magnification of the selected worksheets. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "zoomLevel", optionValue: number): void; + + /** + * Invoked when an action is executed on the Spreadsheet. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "actionExecuted"): ActionExecutedEvent; + + /** + * Invoked when an action is executed on the Spreadsheet. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "actionExecuted", optionValue: ActionExecutedEvent): void; + + /** + * Invoked when an action is about to be executed by the Spreadsheet. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "actionExecuting"): ActionExecutingEvent; + + /** + * Invoked when an action is about to be executed by the Spreadsheet. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "actionExecuting", optionValue: ActionExecutingEvent): void; + + /** + * Invoked when the activeCell of the Spreadsheet has changed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeCellChanged"): ActiveCellChangedEvent; + + /** + * Invoked when the activeCell of the Spreadsheet has changed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeCellChanged", optionValue: ActiveCellChangedEvent): void; + + /** + * Invoked when the activePane of the Spreadsheet has changed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activePaneChanged"): ActivePaneChangedEvent; + + /** + * Invoked when the activePane of the Spreadsheet has changed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activePaneChanged", optionValue: ActivePaneChangedEvent): void; + + /** + * Invoked when the activeWorksheet of the Spreadsheet has changed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheetChanged"): ActiveWorksheetChangedEvent; + + /** + * Invoked when the activeWorksheet of the Spreadsheet has changed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheetChanged", optionValue: ActiveWorksheetChangedEvent): void; + + /** + * Invoked when the Spreadsheet is performing an operation on a protected Worksheet and there is a single range that may be unlocked to allow the operation to be performed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editRangePasswordNeeded"): EditRangePasswordNeededEvent; + + /** + * Invoked when the Spreadsheet is performing an operation on a protected Worksheet and there is a single range that may be unlocked to allow the operation to be performed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editRangePasswordNeeded", optionValue: EditRangePasswordNeededEvent): void; + + /** + * Invoked when a hyperlink is being followed in the Spreadsheet. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "hyperlinkExecuting"): HyperlinkExecutingEvent; + + /** + * Invoked when a hyperlink is being followed in the Spreadsheet. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "hyperlinkExecuting", optionValue: HyperlinkExecutingEvent): void; + + /** + * Invoked when the selection for a ig.spreadsheet.SpreadsheetPane of the Spreadsheet is changed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "selectionChanged"): SelectionChangedEvent; + + /** + * Invoked when the selection for a ig.spreadsheet.SpreadsheetPane of the Spreadsheet is changed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "selectionChanged", optionValue: SelectionChangedEvent): void; + + /** + * Invoked when the user will be prompted with a message regarding an operation that is being performed. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "userPromptDisplaying"): UserPromptDisplayingEvent; + + /** + * Invoked when the user will be prompted with a message regarding an operation that is being performed. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "userPromptDisplaying", optionValue: UserPromptDisplayingEvent): void; + + /** + * Invoked when a change has been made to the workbook that might require a save. + * Note: This event is invoked asynchronously with regards to the change(s) that + * have occurred. Also some changes alone are not considered to dirty the Workbook even though it + * does change state on the Workbook or one of its subobjects. An example of that would be a zoom + * type operation (e.g. changing the magnificationInNormalView). + */ + igSpreadsheet(optionLiteral: 'option', optionName: "workbookDirtied"): WorkbookDirtiedEvent; + + /** + * Invoked when a change has been made to the workbook that might require a save. + * Note: This event is invoked asynchronously with regards to the change(s) that + * have occurred. Also some changes alone are not considered to dirty the Workbook even though it + * does change state on the Workbook or one of its subobjects. An example of that would be a zoom + * type operation (e.g. changing the magnificationInNormalView). + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "workbookDirtied", optionValue: WorkbookDirtiedEvent): void; + igSpreadsheet(options: IgSpreadsheet): JQuery; + igSpreadsheet(optionLiteral: 'option', optionName: string): any; + igSpreadsheet(optionLiteral: 'option', options: IgSpreadsheet): JQuery; + igSpreadsheet(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igSpreadsheet(methodName: string, ...methodParams: any[]): any; +} interface IgTileManagerSplitterOptionsEvents { /** * Event fired after collapsing is performed. Not cancellable. @@ -71682,7 +77728,1701 @@ interface JQuery { igToolbarButton(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; igToolbarButton(methodName: string, ...methodParams: any[]): any; } +interface IgTreeBindingsBindings { + /** + * Option for IgTreeBindingsBindings + */ + [optionName: string]: any; +} + +interface IgTreeBindings { + /** + * Gets the name of the data source property the value of which would be the node text. + * + */ + textKey?: string; + + /** + * Gets the XPath to the text attribute/node. Used in client-only binding directly to XML. + * + */ + textXPath?: string; + + /** + * Gets the name of the data source property the value of which would be the node value. + * + */ + valueKey?: string; + + /** + * Gets the XPath to the value attribute/node. Used in client-only binding directly to XML. + * + */ + valueXPath?: string; + + /** + * Gets the name of the data source property the value of which would be used as a URL for the node image. + * + */ + imageUrlKey?: string; + + /** + * Gets the XPath to the image URL attribute/node. Used in client-only binding directly to XML. + * + */ + imageUrlXPath?: string; + + /** + * Gets the name of the data source property the value of which would be used as an href attribute for the node anchor. + * + */ + navigateUrlKey?: string; + + /** + * Gets the XPath to the navigate URL attribute/node. Used in client-only binding directly to XML. + * + */ + navigateUrlXPath?: string; + + /** + * Gets the name of the data source property the value of which would be used as a target + * attribute for the node anchor. + * + */ + targetKey?: string; + + /** + * Gets the name of the data source property the value of which would indicate that the + * node is expanded on initial load. + * + */ + expandedKey?: string; + + /** + * Gets the name of the data source property the value of which is the primary key attribute + * for the data. This property is used when load on demand is enabled and if specified the node paths + * would be generated using primary keys instead of indices. + * + */ + primaryKey?: string; + + /** + * Gets the node content template for the current layer of bindings. The igTree utilizes igTemplating + * for generating node content templates. A good example of how to setup templating can be found here http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/06/17/how-to-use-templates-to-style-the-different-nodes-of-the-ignite-ui-tree-control.aspx + * + */ + nodeContentTemplate?: string; + + /** + * Gets the name of the data source property that holds the child data of the current layer node. + * + */ + childDataProperty?: string; + + /** + * Gets the XPath to the child data node. Used in client-only binding directly to XML. + * + */ + childDataXPath?: string; + + /** + * Gets the XPath to the root data node. Used in client-only binding directly to XML. + * + */ + searchFieldXPath?: string; + + /** + * Gets the next layer of bindings in a recursive fashion. + * + */ + bindings?: IgTreeBindingsBindings; + + /** + * Option for IgTreeBindings + */ + [optionName: string]: any; +} + +interface IgTreeDragAndDropSettings { + /** + * Gets whether the widget will accept drag and drop from other controls. + * + */ + allowDrop?: boolean; + + /** + * Gets the drag and drop mode. + * + * + * Valid values: + * "default" Performs "copy" when holding the Ctrl key, otherwise "move" is performed. + * "copy" Makes a copy of the dragged node at the drop location. + * "move" Moves the dragged node at the drop location. + */ + dragAndDropMode?: string; + + /** + * Gets the opacity of the drag helper: 0 is fully transparent while 1 is fully opaque. + * + */ + dragOpacity?: number; + + /** + * Gets whether the helper would revert to its original position upon an invalid drop. + * + */ + revert?: boolean; + + /** + * Gets the duration of the revert animation. + * + */ + revertDuration?: number; + + /** + * Gets the z-index that would be set for the drag helper. + * + */ + zIndex?: number; + + /** + * Gets the delay between mousedown and the start of the actual drag. Smaller values make the nodes + * more sensitive to drag and may interfere with selection. + * + */ + dragStartDelay?: number; + + /** + * Gets whether when dragging over a collapsed node with children will trigger the node to expand. + * + */ + expandOnDragOver?: boolean; + + /** + * Gets the delay after hovering a parent node before expanding that node during drag when [expandOnDragOver](ui.igtree#options:dragAndDropSettings.expandOnDragOver) is set to true. + * + */ + expandDelay?: number; + + /** + * Gets the type of helper to be rendered for the drag operation. + * + * + * Valid values: + * "function" A function that will return a DOMElement to use while dragging. + * "default" would render the default igTree helper. + */ + helper?: Function|string; + + /** + * Gets the method for custom drop point validation. Returning true from this function would render the drop point valid, while false would make it invalid. The function has one parameter which is the current drop point and the context (this) of the function is the drag element. + * + * + * Valid values: + * "function" A function that will be used for validating drop points. + * "null" Only built-in validation is applied. + */ + customDropValidation?: Function; + + /** + * Gets the containment for the drag helper. The area inside of which thehelper is contained would be scrollable while dragging. + * + * + * + * Valid values: + * "boolean" If set to false, then the draggable elements will be contained in their window. + * "selector" The draggable element will be contained to the bounding box of the first element found by the selector. If no element is found, no containment will be set. + * "element" The draggable element will be contained to the bounding box of this element. + * "string" Possible values: "parent", "document", "window". + * "array" An array defining a bounding box in the form [ x1, y1, x2, y2 ]. + */ + containment?: boolean|string|Object|Array; + + /** + * Gets the HTML markup for the invalid helper. + * + */ + invalidMoveToMarkup?: string; + + /** + * Gets the HTML markup for the "move to" helper. + * + */ + moveToMarkup?: string; + + /** + * Gets the HTML markup for the "move between" helper. + * + */ + moveBetweenMarkup?: string; + + /** + * Gets the HTML markup for the "move after" helper. + * + */ + moveAfterMarkup?: string; + + /** + * Gets the HTML markup for the "move before" helper. + * + */ + moveBeforeMarkup?: string; + + /** + * Gets the HTML markup for the "copy to" helper. + * + */ + copyToMarkup?: string; + + /** + * Gets the HTML markup for the "copy between" helper. + * + */ + copyBetweenMarkup?: string; + + /** + * Gets the HTML markup for the "copy after" helper. + * + */ + copyAfterMarkup?: string; + + /** + * Gets the HTML markup for the "copy before" helper. + * + */ + copyBeforeMarkup?: string; + + /** + * Option for IgTreeDragAndDropSettings + */ + [optionName: string]: any; +} + +interface NodeCheckstateChangingEvent { + (event: Event, ui: NodeCheckstateChangingEventUIParam): void; +} + +interface NodeCheckstateChangingEventUIParam { +} + +interface NodeCheckstateChangedEvent { + (event: Event, ui: NodeCheckstateChangedEventUIParam): void; +} + +interface NodeCheckstateChangedEventUIParam { +} + +interface NodePopulatingEvent { + (event: Event, ui: NodePopulatingEventUIParam): void; +} + +interface NodePopulatingEventUIParam { +} + +interface NodePopulatedEvent { + (event: Event, ui: NodePopulatedEventUIParam): void; +} + +interface NodePopulatedEventUIParam { +} + +interface NodeCollapsingEvent { + (event: Event, ui: NodeCollapsingEventUIParam): void; +} + +interface NodeCollapsingEventUIParam { +} + +interface NodeCollapsedEvent { + (event: Event, ui: NodeCollapsedEventUIParam): void; +} + +interface NodeCollapsedEventUIParam { +} + +interface NodeExpandingEvent { + (event: Event, ui: NodeExpandingEventUIParam): void; +} + +interface NodeExpandingEventUIParam { +} + +interface NodeExpandedEvent { + (event: Event, ui: NodeExpandedEventUIParam): void; +} + +interface NodeExpandedEventUIParam { +} + +interface NodeClickEvent { + (event: Event, ui: NodeClickEventUIParam): void; +} + +interface NodeClickEventUIParam { +} + +interface NodeDoubleClickEvent { + (event: Event, ui: NodeDoubleClickEventUIParam): void; +} + +interface NodeDoubleClickEventUIParam { +} + +interface NodeDroppingEvent { + (event: Event, ui: NodeDroppingEventUIParam): void; +} + +interface NodeDroppingEventUIParam { +} + +interface NodeDroppedEvent { + (event: Event, ui: NodeDroppedEventUIParam): void; +} + +interface NodeDroppedEventUIParam { +} + +interface IgTree { + /** + * Gets/Sets the width of the control container. + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) and percentage (%). + * "number" The widget width can be set as a number in pixels. + * "null" No width will be applied to the container and it will be rendered by default for the browser rendering engine. + */ + width?: string|number; + + /** + * Gets/Sets how the height of of the control container. + * + * + * Valid values: + * "string" The widget height can be set in pixels (px) and percentage (%). + * "number" The widget height can be set as a number in pixels. + * "null" No height will be applied to the container and it will be rendered default for the browser rendering engine. + */ + height?: string|number; + + /** + * Gets the behavior and type of the checkboxes rendered for the tree nodes. Can be set only at initialization. + * + * + * Valid values: + * "off" Checkboxes are turned off and are not rendered for the tree. + * "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; + + /** + * Gets/Sets one or more branches to be expanded at a time. If set to true then only one branch at each level of the tree can be expanded at a time. Otherwise multiple branches can be expanded at a time. + * + */ + singleBranchExpand?: boolean; + + /** + * Gets/Sets whether nodes are hoverable. Setting this option to false would make the tree to not apply hover styles on the nodes when they are hovered. + * + */ + hotTracking?: boolean; + + /** + * Gets/Sets the image url applied to all parent nodes. + * + * + * Valid values: + * "string" Image with the specified URL will be rendered for each node that has children (If you define both parentNodeImageUrl and parentNodeImageClass the parentNodeImageUrl would take priority). + * "null" Option is ignored + */ + parentNodeImageUrl?: string; + + /** + * Gets/Sets the CSS class applied to all parent nodes. + * + * + * Valid values: + * "string" Specified class with a CSS sprite that would be rendered for each node that has children (If you define both parentNodeImageUrl and parentNodeImageClass the parentNodeImageUrl would take priority). + * "null" Option is ignored + */ + parentNodeImageClass?: string; + + /** + * Gets/Sets the tooltip applied to all parent node images. + * + * + * Valid values: + * "string" Specified a tooltip that would be rendered for each node that has children. + * "null" Option is ignored + */ + parentNodeImageTooltip?: string; + + /** + * Gets/Sets the image url applied to all leaf nodes. + * + * + * Valid values: + * "string" Image with the specified URL will be rendered for each node that has no children (If you define both leafNodeImageUrl and leafNodeImageClass the leafNodeImageUrl would take priority). + * "null" Option is ignored + */ + leafNodeImageUrl?: string; + + /** + * Gets/Sets the CSS class applied to all leaf nodes. + * + * + * Valid values: + * "string" Specified class with a CSS sprite that would be rendered for each node that has no children (If you define both leafNodeImageUrl and leafNodeImageClass the leafNodeImageUrl would take priority). + * "null" Option is ignored + */ + leafNodeImageClass?: string; + + /** + * Gets/Sets the tooltip applied to all leaf node images. + * + * + * Valid values: + * "string" Specified a tooltip that would be rendered for each node that has no children. + * "null" Option is ignored + */ + leafNodeImageTooltip?: string; + + /** + * Gets/Sets the duration of each animation such as the expand/collapse. + * + */ + animationDuration?: number; + + /** + * Gets the node data-path attribute separator character. + * + */ + pathSeparator?: string; + + /** + * Gets/Sets the igTree data source. Accepts any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + * Once the data source is initialized, this option becomes an instance of the $.ig.HierarchicalDataSource. + * + */ + dataSource?: any; + + /** + * Gets/Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * + * + * Valid values: + * "string" Specifies the remote url. + * "null" Option is ignored. + */ + dataSourceUrl?: string; + + /** + * Gets the type of the data source. Delegates the value to [$.ig.DataSource.settings.type](ig.datasource#options:settings.type). Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource.settings.type. + * + * + * Valid values: + * "string" Specifies the data source type implicitly. + * "null" Type is inferred. + */ + dataSourceType?: string; + + /** + * Gets the JSON key at which a remote data source will write the data. Delegates the value to [$.ig.DataSource.settings.responseDataKey](ig.datasource#options:settings.responseDataKey). Please refer to the documentation of $.ig.DataSource.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; + + /** + * Gets the data type of the remote data source response. Delegates the value to [$.ig.DataSource.settings.responseDataType](ig.datasource#options:settings.responseDataType). Please refer to the documentation of $.ig.DataSource.settings.responseDataType. + * + * + * Valid values: + * "string" Response type when a URL is set as the data source. See http://api.jquery.com/jQuery.ajax/ => dataType. + * "null" Type is inferred. + */ + responseDataType?: string; + + /** + * Gets the HTTP verb used for remote requests. Specifies the HTTP verb to be used to issue the requests to the [dataSourceUrl](ui.igtree#options:dataSourceUrl). + * + */ + requestType?: string; + + /** + * Gets the type of the content in a remote data source response. Content type of the response from the [dataSourceUrl](ui.igtree#options:dataSourceUrl). See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + responseContentType?: string; + + /** + * Gets the initial depth the igTree is going to be expanded to upon initial render. + * + */ + initialExpandDepth?: number; + + /** + * Gets whether all the data would be bound initially or each child collection would be bound upon expand. + * + */ + loadOnDemand?: boolean; + + /** + * Gets the data binding properties and keys. The igTree uses these to extract the corresponding data from the dataSource. + * + */ + bindings?: IgTreeBindings; + + /** + * Gets the default target attribute value for the node anchors. + * + */ + defaultNodeTarget?: string; + + /** + * Gets/Sets whether drag and drop functionality is enabled. + * + */ + dragAndDrop?: boolean; + + /** + * Gets the URL to which updating requests will be made. + * + */ + updateUrl?: string; + + /** + * Gets/Sets specific settings for the drag and drop functionality. + * + */ + dragAndDropSettings?: IgTreeDragAndDropSettings; + + /** + * Fired before databinding is performed. + */ + dataBinding?: DataBindingEvent; + + /** + * Fired after databinding is finished. + */ + dataBound?: DataBoundEvent; + + /** + * Fired before rendering of the tree begins. + */ + rendering?: RenderingEvent; + + /** + * Fired after rendering of the tree has finished. + */ + rendered?: RenderedEvent; + + /** + * Fired before a new node is selected. + */ + selectionChanging?: SelectionChangingEvent; + + /** + * Fired after a new node is selected. + */ + selectionChanged?: SelectionChangedEvent; + + /** + * Fired before the checkbox state of a node is changed. + */ + nodeCheckstateChanging?: NodeCheckstateChangingEvent; + + /** + * Fired after the checkstate of a node is changed. + */ + nodeCheckstateChanged?: NodeCheckstateChangedEvent; + + /** + * Fired before the children of a node are populated in the case of load on demand. + */ + nodePopulating?: NodePopulatingEvent; + + /** + * Fired after the children of a node are populated in the case of load on demand. + */ + nodePopulated?: NodePopulatedEvent; + + /** + * Fired before a node is collapsed. + */ + nodeCollapsing?: NodeCollapsingEvent; + + /** + * Fired after a node is collapsed. + */ + nodeCollapsed?: NodeCollapsedEvent; + + /** + * Fired before a node is expanded. + */ + nodeExpanding?: NodeExpandingEvent; + + /** + * Fired after a node is expanded. + */ + nodeExpanded?: NodeExpandedEvent; + + /** + * Fired on node click. + */ + nodeClick?: NodeClickEvent; + + /** + * Fired on node double click. + */ + nodeDoubleClick?: NodeDoubleClickEvent; + + /** + * Fired on node drag start. + */ + dragStart?: DragStartEvent; + + /** + * Fired on node drag. + */ + drag?: DragEvent; + + /** + * Fired after a drag operation has completed. + */ + dragStop?: DragStopEvent; + + /** + * Fired before a node is dropped. + */ + nodeDropping?: NodeDroppingEvent; + + /** + * Fired after a node is dropped. + */ + nodeDropped?: NodeDroppedEvent; + + /** + * Option for igTree + */ + [optionName: string]: any; +} +interface IgTreeMethods { + /** + * Performs databinding on the igTree. + */ + dataBind(): void; + + /** + * Toggles the checkstate of a node if checkboxMode is not set to off, otherwise does nothing. + * + * @param node Specifies the node element the checkbox of which would be toggled. + * @param event Indicates the browser event which triggered this action, if this is not an API call. + */ + toggleCheckstate(node: Object, event?: Object): void; + + /** + * Toggles the collapse/expand state for the specified node. + * + * @param node Specifies the node element the checkbox of which would be toggled. + * @param event Indicates the browser event which triggered this action, if this is not an API call. + */ + toggle(node: Object, event?: Object): void; + + /** + * Expands the tree down to the specified node and selects the node if specified. + * + * @param node Specifies the node element down to which the tree would be expanded. + * @param toSelect Specifies the whether to select the node after expanding to it. + */ + expandToNode(node: Object, toSelect?: boolean): void; + + /** + * Expands the specified node. + * + * @param node Specifies the node element to expand. + */ + expand(node: Object): void; + + /** + * Collapses the specified node. + * + * @param node Specifies the node element to collapse. + */ + collapse(node: Object): void; + + /** + * Retrieves the parent node element of the specified node element. + * + * @param node Specifies the jQuery selected node element to collapse. + */ + parentNode(node: Object): Object; + + /** + * Retrieves the jQuery element of the node with the specified path. + * + * @param nodePath Specifies the path to the required node. + */ + nodeByPath(nodePath: string): Object; + + /** + * Retrieves the jQuery element of the node with the specified value. + * + * @param value Specifies the value of the required node. + */ + nodesByValue(value: string): Object; + + /** + * Retrieves all the node objects for the nodes that have their checkboxes checked. + */ + checkedNodes(): any[]; + + /** + * Retrieves all the node objects for the nodes that have their checkboxes unchecked. + */ + uncheckedNodes(): any[]; + + /** + * Retrieves all the node objects for the nodes that have their checkboxes partially checked. + */ + partiallyCheckedNodes(): any[]; + + /** + * Selects a node. + * + * @param node Specifies the node element to be selected. + * @param event Indicates the browser event which triggered this action, if this is not an API call. + */ + select(node: Object, event?: Object): void; + + /** + * Deselects the specified node. + * + * @param node Specifies the node element to be deselected. + */ + deselect(node: Object): void; + + /** + * Deselects all the selected nodes. + */ + clearSelection(): void; + + /** + * Retrieves the node object for the selected node. + */ + selectedNode(): Object; + + /** + * Retrieves all node objects with the specified text (case sensitive). + * + * @param text The text to search for. + * @param parent The node element to start the search from. If not specified then search would start from the root of the tree. + */ + findNodesByText(text: string, parent?: Object): any[]; + + /** + * Retrieves all node objects for the immediate children of the specified parent with the specified text (case sensitive). + * + * @param text The text to search for. + * @param parent The node element the children of which would be searched. + */ + findImmediateNodesByText(text: string, parent?: Object): any[]; + + /** + * Retrieves the n-th jQuery node element child of the specified parent. + * + * @param index Specifies the index the node at which to be retrieved. + * @param parent The parent node element to start the search from. + */ + nodeByIndex(index: number, parent?: Object): Object; + + /** + * Retrieves a node object for the specified node element. + * + * @param element Specifies the node element. + */ + nodeFromElement(element: Object): Object; + + /** + * Retrieves a node object collection of the immediate children of the provided node element. + * + * @param parent Specifies the node element. + */ + children(parent: Object): any[]; + + /** + * Retrieves a node object collection of the immediate children of the node with the provided path. + * + * @param path Specifies the path of the node the children of which are to be retrieved. + */ + childrenByPath(path: string): any[]; + + /** + * Returns true if the provided node element is selected and false otherwise. + * + * @param node Specifies the node element. + */ + isSelected(node: Object): boolean; + + /** + * Returns true if the provided node element is expanded and false otherwise. + * + * @param node Specifies the node element. + */ + isExpanded(node: Object): boolean; + + /** + * Returns true if the provided node element has its checkbox checkstate checked and false otherwise. + * + * @param node Specifies the node element. + */ + isChecked(node: Object): boolean; + + /** + * Returns the specified node checkstate. + * + * @param node Specifies the node element. + */ + checkState(node: Object): string; + + /** + * Adds a new array of nodes to the tree. New nodes are appended to the root or to a specified parent node, at a specified index. + * + * @param node Specifies the data used to create the new nodeс. + * @param parent Specifies the element of the parent node the nodes are to be appended to. + * @param nodeIndex Specifies the index at which the nodes to be inserted. + */ + addNode(node: Object, parent?: Object, nodeIndex?: number): void; + + /** + * Removes the node with with the specified path and all of its children. + * + * @param path Specifies the path of the node to be removed. + */ + removeAt(path: string): void; + + /** + * Removing all the nodes with the specified value. + * + * @param value Specifies the value of the nodes to be removed. + */ + removeNodesByValue(value: string): void; + + /** + * Performs a UI update on the provided node element with the provided data. + * + * @param element Specifies the node to be updated. + * @param data Specifies the new data item the node would update according to. + */ + applyChangesToNode(element: Object, data: Object): void; + + /** + * Returns the transaction log stack. + */ + transactionLog(): any[]; + + /** + * Returns the data for the node with specified path. + * + * @param path Specifies the node path for which the data is returned. + */ + nodeDataFor(path: string): Object; + + /** + * Destructor for the igTree widget. + */ + destroy(): void; +} +interface JQuery { + data(propertyName: "igTree"): IgTreeMethods; +} + +interface JQuery { + igTree(methodName: "dataBind"): void; + igTree(methodName: "toggleCheckstate", node: Object, event?: Object): void; + igTree(methodName: "toggle", node: Object, event?: Object): void; + igTree(methodName: "expandToNode", node: Object, toSelect?: boolean): void; + igTree(methodName: "expand", node: Object): void; + igTree(methodName: "collapse", node: Object): void; + igTree(methodName: "parentNode", node: Object): Object; + igTree(methodName: "nodeByPath", nodePath: string): Object; + igTree(methodName: "nodesByValue", value: string): Object; + igTree(methodName: "checkedNodes"): any[]; + igTree(methodName: "uncheckedNodes"): any[]; + igTree(methodName: "partiallyCheckedNodes"): any[]; + igTree(methodName: "select", node: Object, event?: Object): void; + igTree(methodName: "deselect", node: Object): void; + igTree(methodName: "clearSelection"): void; + igTree(methodName: "selectedNode"): Object; + igTree(methodName: "findNodesByText", text: string, parent?: Object): any[]; + igTree(methodName: "findImmediateNodesByText", text: string, parent?: Object): any[]; + igTree(methodName: "nodeByIndex", index: number, parent?: Object): Object; + igTree(methodName: "nodeFromElement", element: Object): Object; + igTree(methodName: "children", parent: Object): any[]; + igTree(methodName: "childrenByPath", path: string): any[]; + igTree(methodName: "isSelected", node: Object): boolean; + igTree(methodName: "isExpanded", node: Object): boolean; + igTree(methodName: "isChecked", node: Object): boolean; + igTree(methodName: "checkState", node: Object): string; + igTree(methodName: "addNode", node: Object, parent?: Object, nodeIndex?: number): void; + igTree(methodName: "removeAt", path: string): void; + igTree(methodName: "removeNodesByValue", value: string): void; + igTree(methodName: "applyChangesToNode", element: Object, data: Object): void; + igTree(methodName: "transactionLog"): any[]; + igTree(methodName: "nodeDataFor", path: string): Object; + igTree(methodName: "destroy"): void; + + /** + * Gets/Sets the width of the control container. + * + */ + igTree(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * /Sets the width of the control container. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "width", optionValue: string|number): void; + + /** + * Gets/Sets how the height of of the control container. + * + */ + igTree(optionLiteral: 'option', optionName: "height"): string|number; + + /** + * /Sets how the height of of the control container. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * Gets the behavior and type of the checkboxes rendered for the tree nodes. Can be set only at initialization. + * + */ + igTree(optionLiteral: 'option', optionName: "checkboxMode"): string; + + /** + * The behavior and type of the checkboxes rendered for the tree nodes. Can be set only at initialization. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "checkboxMode", optionValue: string): void; + + /** + * Gets/Sets one or more branches to be expanded at a time. If set to true then only one branch at each level of the tree can be expanded at a time. Otherwise multiple branches can be expanded at a time. + * + */ + igTree(optionLiteral: 'option', optionName: "singleBranchExpand"): boolean; + + /** + * /Sets one or more branches to be expanded at a time. If set to true then only one branch at each level of the tree can be expanded at a time. Otherwise multiple branches can be expanded at a time. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "singleBranchExpand", optionValue: boolean): void; + + /** + * Gets/Sets whether nodes are hoverable. Setting this option to false would make the tree to not apply hover styles on the nodes when they are hovered. + * + */ + igTree(optionLiteral: 'option', optionName: "hotTracking"): boolean; + + /** + * /Sets whether nodes are hoverable. Setting this option to false would make the tree to not apply hover styles on the nodes when they are hovered. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "hotTracking", optionValue: boolean): void; + + /** + * Gets/Sets the image url applied to all parent nodes. + * + */ + igTree(optionLiteral: 'option', optionName: "parentNodeImageUrl"): string; + + /** + * /Sets the image url applied to all parent nodes. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "parentNodeImageUrl", optionValue: string): void; + + /** + * Gets/Sets the CSS class applied to all parent nodes. + * + */ + igTree(optionLiteral: 'option', optionName: "parentNodeImageClass"): string; + + /** + * /Sets the CSS class applied to all parent nodes. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "parentNodeImageClass", optionValue: string): void; + + /** + * Gets/Sets the tooltip applied to all parent node images. + * + */ + igTree(optionLiteral: 'option', optionName: "parentNodeImageTooltip"): string; + + /** + * /Sets the tooltip applied to all parent node images. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "parentNodeImageTooltip", optionValue: string): void; + + /** + * Gets/Sets the image url applied to all leaf nodes. + * + */ + igTree(optionLiteral: 'option', optionName: "leafNodeImageUrl"): string; + + /** + * /Sets the image url applied to all leaf nodes. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "leafNodeImageUrl", optionValue: string): void; + + /** + * Gets/Sets the CSS class applied to all leaf nodes. + * + */ + igTree(optionLiteral: 'option', optionName: "leafNodeImageClass"): string; + + /** + * /Sets the CSS class applied to all leaf nodes. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "leafNodeImageClass", optionValue: string): void; + + /** + * Gets/Sets the tooltip applied to all leaf node images. + * + */ + igTree(optionLiteral: 'option', optionName: "leafNodeImageTooltip"): string; + + /** + * /Sets the tooltip applied to all leaf node images. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "leafNodeImageTooltip", optionValue: string): void; + + /** + * Gets/Sets the duration of each animation such as the expand/collapse. + * + */ + igTree(optionLiteral: 'option', optionName: "animationDuration"): number; + + /** + * /Sets the duration of each animation such as the expand/collapse. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; + + /** + * Gets the node data-path attribute separator character. + * + */ + igTree(optionLiteral: 'option', optionName: "pathSeparator"): string; + + /** + * The node data-path attribute separator character. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "pathSeparator", optionValue: string): void; + + /** + * Gets/Sets the igTree data source. Accepts any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + * Once the data source is initialized, this option becomes an instance of the $.ig.HierarchicalDataSource. + * + */ + igTree(optionLiteral: 'option', optionName: "dataSource"): any; + + /** + * /Sets the igTree data source. Accepts any valid data source accepted by $.ig.DataSource, or an instance of an $.ig.DataSource itself. + * Once the data source is initialized, this option becomes an instance of the $.ig.HierarchicalDataSource. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dataSource", optionValue: any): void; + + /** + * Gets/Sets a remote URL accepted by [$.ig.DataSource](ig.datasource) in order to request data from it. + * + */ + igTree(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. + */ + igTree(optionLiteral: 'option', optionName: "dataSourceUrl", optionValue: string): void; + + /** + * Gets the type of the data source. Delegates the value to [$.ig.DataSource.settings.type](ig.datasource#options:settings.type). Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource.settings.type. + * + */ + igTree(optionLiteral: 'option', optionName: "dataSourceType"): string; + + /** + * The type of the data source. Delegates the value to [$.ig.DataSource.settings.type](ig.datasource#options:settings.type). Explicitly set data source type (such as "json"). Please refer to the documentation of $.ig.DataSource.settings.type. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * Gets the JSON key at which a remote data source will write the data. Delegates the value to [$.ig.DataSource.settings.responseDataKey](ig.datasource#options:settings.responseDataKey). Please refer to the documentation of $.ig.DataSource.settings.responseDataKey. + * + */ + igTree(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * The JSON key at which a remote data source will write the data. Delegates the value to [$.ig.DataSource.settings.responseDataKey](ig.datasource#options:settings.responseDataKey). Please refer to the documentation of $.ig.DataSource.settings.responseDataKey. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * Gets the data type of the remote data source response. Delegates the value to [$.ig.DataSource.settings.responseDataType](ig.datasource#options:settings.responseDataType). Please refer to the documentation of $.ig.DataSource.settings.responseDataType. + * + */ + igTree(optionLiteral: 'option', optionName: "responseDataType"): string; + + /** + * The data type of the remote data source response. Delegates the value to [$.ig.DataSource.settings.responseDataType](ig.datasource#options:settings.responseDataType). Please refer to the documentation of $.ig.DataSource.settings.responseDataType. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "responseDataType", optionValue: string): void; + + /** + * Gets the HTTP verb used for remote requests. Gets the HTTP verb to be used to issue the requests to the [dataSourceUrl](ui.igtree#options:dataSourceUrl). + * + */ + igTree(optionLiteral: 'option', optionName: "requestType"): string; + + /** + * The HTTP verb used for remote requests. Sets the HTTP verb to be used to issue the requests to the [dataSourceUrl](ui.igtree#options:dataSourceUrl). + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; + + /** + * Gets the type of the content in a remote data source response. Content type of the response from the [dataSourceUrl](ui.igtree#options:dataSourceUrl). See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + igTree(optionLiteral: 'option', optionName: "responseContentType"): string; + + /** + * The type of the content in a remote data source response. Content type of the response from the [dataSourceUrl](ui.igtree#options:dataSourceUrl). See http://api.jquery.com/jQuery.ajax/ => contentType + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + + /** + * Gets the initial depth the igTree is going to be expanded to upon initial render. + * + */ + igTree(optionLiteral: 'option', optionName: "initialExpandDepth"): number; + + /** + * The initial depth the igTree is going to be expanded to upon initial render. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "initialExpandDepth", optionValue: number): void; + + /** + * Gets whether all the data would be bound initially or each child collection would be bound upon expand. + * + */ + igTree(optionLiteral: 'option', optionName: "loadOnDemand"): boolean; + + /** + * Whether all the data would be bound initially or each child collection would be bound upon expand. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "loadOnDemand", optionValue: boolean): void; + + /** + * Gets the data binding properties and keys. The igTree uses these to extract the corresponding data from the dataSource. + * + */ + igTree(optionLiteral: 'option', optionName: "bindings"): IgTreeBindings; + + /** + * The data binding properties and keys. The igTree uses these to extract the corresponding data from the dataSource. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "bindings", optionValue: IgTreeBindings): void; + + /** + * Gets the default target attribute value for the node anchors. + * + */ + igTree(optionLiteral: 'option', optionName: "defaultNodeTarget"): string; + + /** + * The default target attribute value for the node anchors. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "defaultNodeTarget", optionValue: string): void; + + /** + * Gets/Sets whether drag and drop functionality is enabled. + * + */ + igTree(optionLiteral: 'option', optionName: "dragAndDrop"): boolean; + + /** + * /Sets whether drag and drop functionality is enabled. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dragAndDrop", optionValue: boolean): void; + + /** + * Gets the URL to which updating requests will be made. + * + */ + igTree(optionLiteral: 'option', optionName: "updateUrl"): string; + + /** + * The URL to which updating requests will be made. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; + + /** + * Gets/Sets specific settings for the drag and drop functionality. + * + */ + igTree(optionLiteral: 'option', optionName: "dragAndDropSettings"): IgTreeDragAndDropSettings; + + /** + * /Sets specific settings for the drag and drop functionality. + * + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dragAndDropSettings", optionValue: IgTreeDragAndDropSettings): void; + + /** + * Fired before databinding is performed. + */ + igTree(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Fired before databinding is performed. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Fired after databinding is finished. + */ + igTree(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Fired after databinding is finished. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Fired before rendering of the tree begins. + */ + igTree(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Fired before rendering of the tree begins. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Fired after rendering of the tree has finished. + */ + igTree(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Fired after rendering of the tree has finished. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Fired before a new node is selected. + */ + igTree(optionLiteral: 'option', optionName: "selectionChanging"): SelectionChangingEvent; + + /** + * Fired before a new node is selected. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "selectionChanging", optionValue: SelectionChangingEvent): void; + + /** + * Fired after a new node is selected. + */ + igTree(optionLiteral: 'option', optionName: "selectionChanged"): SelectionChangedEvent; + + /** + * Fired after a new node is selected. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "selectionChanged", optionValue: SelectionChangedEvent): void; + + /** + * Fired before the checkbox state of a node is changed. + */ + igTree(optionLiteral: 'option', optionName: "nodeCheckstateChanging"): NodeCheckstateChangingEvent; + + /** + * Fired before the checkbox state of a node is changed. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeCheckstateChanging", optionValue: NodeCheckstateChangingEvent): void; + + /** + * Fired after the checkstate of a node is changed. + */ + igTree(optionLiteral: 'option', optionName: "nodeCheckstateChanged"): NodeCheckstateChangedEvent; + + /** + * Fired after the checkstate of a node is changed. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeCheckstateChanged", optionValue: NodeCheckstateChangedEvent): void; + + /** + * Fired before the children of a node are populated in the case of load on demand. + */ + igTree(optionLiteral: 'option', optionName: "nodePopulating"): NodePopulatingEvent; + + /** + * Fired before the children of a node are populated in the case of load on demand. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodePopulating", optionValue: NodePopulatingEvent): void; + + /** + * Fired after the children of a node are populated in the case of load on demand. + */ + igTree(optionLiteral: 'option', optionName: "nodePopulated"): NodePopulatedEvent; + + /** + * Fired after the children of a node are populated in the case of load on demand. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodePopulated", optionValue: NodePopulatedEvent): void; + + /** + * Fired before a node is collapsed. + */ + igTree(optionLiteral: 'option', optionName: "nodeCollapsing"): NodeCollapsingEvent; + + /** + * Fired before a node is collapsed. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeCollapsing", optionValue: NodeCollapsingEvent): void; + + /** + * Fired after a node is collapsed. + */ + igTree(optionLiteral: 'option', optionName: "nodeCollapsed"): NodeCollapsedEvent; + + /** + * Fired after a node is collapsed. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeCollapsed", optionValue: NodeCollapsedEvent): void; + + /** + * Fired before a node is expanded. + */ + igTree(optionLiteral: 'option', optionName: "nodeExpanding"): NodeExpandingEvent; + + /** + * Fired before a node is expanded. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeExpanding", optionValue: NodeExpandingEvent): void; + + /** + * Fired after a node is expanded. + */ + igTree(optionLiteral: 'option', optionName: "nodeExpanded"): NodeExpandedEvent; + + /** + * Fired after a node is expanded. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeExpanded", optionValue: NodeExpandedEvent): void; + + /** + * Fired on node click. + */ + igTree(optionLiteral: 'option', optionName: "nodeClick"): NodeClickEvent; + + /** + * Fired on node click. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeClick", optionValue: NodeClickEvent): void; + + /** + * Fired on node double click. + */ + igTree(optionLiteral: 'option', optionName: "nodeDoubleClick"): NodeDoubleClickEvent; + + /** + * Fired on node double click. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeDoubleClick", optionValue: NodeDoubleClickEvent): void; + + /** + * Fired on node drag start. + */ + igTree(optionLiteral: 'option', optionName: "dragStart"): DragStartEvent; + + /** + * Fired on node drag start. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dragStart", optionValue: DragStartEvent): void; + + /** + * Fired on node drag. + */ + igTree(optionLiteral: 'option', optionName: "drag"): DragEvent; + + /** + * Fired on node drag. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "drag", optionValue: DragEvent): void; + + /** + * Fired after a drag operation has completed. + */ + igTree(optionLiteral: 'option', optionName: "dragStop"): DragStopEvent; + + /** + * Fired after a drag operation has completed. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "dragStop", optionValue: DragStopEvent): void; + + /** + * Fired before a node is dropped. + */ + igTree(optionLiteral: 'option', optionName: "nodeDropping"): NodeDroppingEvent; + + /** + * Fired before a node is dropped. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeDropping", optionValue: NodeDroppingEvent): void; + + /** + * Fired after a node is dropped. + */ + igTree(optionLiteral: 'option', optionName: "nodeDropped"): NodeDroppedEvent; + + /** + * Fired after a node is dropped. + * + * @optionValue New value to be set. + */ + igTree(optionLiteral: 'option', optionName: "nodeDropped", optionValue: NodeDroppedEvent): void; + igTree(options: IgTree): JQuery; + igTree(optionLiteral: 'option', optionName: string): any; + igTree(optionLiteral: 'option', options: IgTree): JQuery; + igTree(optionLiteral: 'option', optionName: string, optionValue: any): JQuery; + igTree(methodName: string, ...methodParams: any[]): any; +} interface IgTreeGridColumnFixing { + /** + * Specifies the tooltip text on the column fixing header icon when column is not fixed. + * + */ + headerFixButtonText?: string; + + /** + * Specifies the tooltip text on the column fixing header icon when column is fixed. + * + */ + headerUnfixButtonText?: string; + + /** + * Specifies whether to show the column fixing buttons in header cells/feature chooser. + * + */ + showFixButtons?: boolean; + + /** + * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * + */ + syncRowHeights?: boolean; + + /** + * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * + */ + scrollDelta?: number; + + /** + * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * + * + * Valid values: + * "left" Fixed columns are rendered on the left side of the main grid. + * "right" Fixed columns are rendered on the right side of the main grid. + */ + fixingDirection?: string; + + /** + * List of column settings that specifies custom column fixing options on a per column basis. + * + */ + columnSettings?: IgGridColumnFixingColumnSetting[]; + + /** + * Text of the feature chooser button for fixing a currently unfixed column. + * + */ + featureChooserTextFixedColumn?: string; + + /** + * Text of the feature chooser button for unfixing a currently fixed column. + * + */ + featureChooserTextUnfixedColumn?: string; + + /** + * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * + * + * Valid values: + * "string" The width can be set in pixels (px) and percentage (%). + * "number" The width can be set in pixels as a number. + */ + minimalVisibleAreaWidth?: string|number; + + /** + * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * + */ + fixNondataColumns?: boolean; + + /** + * When true all the TR DOM attributes of the unfixed row will be copied to the fixed row. Note that when enabled this option negatively affects performance when fixing a column. + */ + populateDataRowsAttributes?: boolean; + + /** + * Event which is fired when column fixing operation is initiated. + */ + columnFixing?: ColumnFixingEvent; + + /** + * Event which is fired when column fixing operation is finished + */ + columnFixed?: ColumnFixedEvent; + + /** + * Event which is fired when column unfixing operation is initiated + */ + columnUnfixing?: ColumnUnfixingEvent; + + /** + * Event which is fired when column unfixing operation is done + */ + columnUnfixed?: ColumnUnfixedEvent; + + /** + * Event which is fired when column fixing operation has failed - e.g. sum of the width of the fixed columns container and width of the column to be fixed exceeds the grid width + */ + columnFixingRefused?: ColumnFixingRefusedEvent; + + /** + * Event which is fired when column unfixing operation has failed - e.g.: there is only one fixed visible column(and tries to unfix it) and at least one fixed hidden column + */ + columnUnfixingRefused?: ColumnUnfixingRefusedEvent; + /** * Option for igTreeGridColumnFixing */ @@ -71690,6 +79430,100 @@ interface IgTreeGridColumnFixing { } interface IgTreeGridColumnFixingMethods { destroy(): void; + + /** + * Unfixes a column by specified column identifier - column key or column index. + * + * @param colIdentifier An identifier of the column to be unfixed - column index or column key. + * @param target Key of the column where the unfixed column should move to. + * @param after Specifies where the unfixed column should be rendered after or before the target column. This parameter is disregarded if there is no target column specified. + */ + unfixColumn(colIdentifier: Object, target?: string, after?: boolean): Object; + + /** + * Checks whether the heights of fixed and unfixed tables are equal - if not sync them. Similar check is made for heights of table rows. + */ + checkAndSyncHeights(): void; + + /** + * If the 'check' argument is set to true, checks whether the heights of fixed and unfixed tables are equal, if not sync them. Similar check is made for heights of table rows. If the clearRowsHeights argument is set to true, clears rows heights before syncing them. + * + * @param check If set to true, checks whether the heights of fixed and unfixed tables are equal, if not sync them. If this argument is set to false sync is performed regardless of the current heights. + * @param clearRowsHeights Clears row heigths for all visible rows. + */ + syncHeights(check?: boolean, clearRowsHeights?: boolean): void; + + /** + * Returns whether the column with the specified key is a column group header, when the [multi-column headers](http://www.igniteui.com/help/iggrid-multicolumnheaders-landingpage) feature is used. + * + * @param colKey The key of the column to perform the check for. + */ + isGroupHeader(colKey: string): boolean; + + /** + * Checks whether column fixing is allowed for the specified columns. It should not be allowed if there is only one visible column in the unfixed area. + * + * @param columns Array of columns and/or column identifiers - could be column indexes, column keys, column object or mixed. + */ + checkFixingAllowed(columns: any[]): boolean; + + /** + * Checks whether unfixing is allowed for the specified columns. It should not be allowed if there is only one visible column in the fixed area. + * + * @param columns Array of columns and/or column identifiers - could be column indexes, column keys, column object or mixed. + */ + checkUnfixingAllowed(columns: any[]): boolean; + + /** + * Fixes a column by specified column identifier - column index or column key. + * + * @param colIdentifier An identifier of the column to be fixed - column index or column key. + * @param target Key of the column where the fixed column should move to. + * @param after Specifies where the fixed column should be moved after or before the target column. This parameter is disregarded if there is no target column specified. + */ + fixColumn(colIdentifier: Object, target?: string, after?: boolean): Object; + + /** + * Fixes non-data columns (such as the row numbering column of row selectors) if any and if [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is left. Does nothing if the non-data columns are already fixed. + */ + fixNonDataColumns(): void; + + /** + * This function is deprecated - use function fixNonDataColumns. + */ + fixDataSkippedColumns(): void; + + /** + * Unfixes non-data columns (such as the row numbering column of row selectors) if any and if [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is left. Does nothing if the non-data columns are already fixed. + */ + unfixNonDataColumns(): void; + + /** + * This function is deprecated - use function unfixNonDataColumns. + */ + unfixDataSkippedColumns(): void; + + /** + * Unfixes all fixed columns. + */ + unfixAllColumns(): void; + + /** + * Syncs rows heights between two collections of rows. + * + * @param $trs An array of rows of the first(fixed/unfixed) container. + * @param $anotherRows An array of rows of the second(fixed/unfixed) container. + */ + syncRowsHeights($trs: any[], $anotherRows: any[]): void; + + /** + * Calculates widths of the fixed columns. + * + * @param fCols Array of grid columns. If not set then the total width of the fixed columns are returned. + * @param excludeNonDataColumns If set to true do not calculate the width of non-data fixed columns (like the row selector row numbering column). + * @param includeHidden If set to true calculates width of the hidden fixed columns (their initial width before hiding). + */ + getWidthOfFixedColumns(fCols?: any[], excludeNonDataColumns?: boolean, includeHidden?: boolean): number; } interface JQuery { data(propertyName: "igTreeGridColumnFixing"): IgTreeGridColumnFixingMethods; @@ -71697,6 +79531,258 @@ interface JQuery { interface JQuery { igTreeGridColumnFixing(methodName: "destroy"): void; + igTreeGridColumnFixing(methodName: "unfixColumn", colIdentifier: Object, target?: string, after?: boolean): Object; + igTreeGridColumnFixing(methodName: "checkAndSyncHeights"): void; + igTreeGridColumnFixing(methodName: "syncHeights", check?: boolean, clearRowsHeights?: boolean): void; + igTreeGridColumnFixing(methodName: "isGroupHeader", colKey: string): boolean; + igTreeGridColumnFixing(methodName: "checkFixingAllowed", columns: any[]): boolean; + igTreeGridColumnFixing(methodName: "checkUnfixingAllowed", columns: any[]): boolean; + igTreeGridColumnFixing(methodName: "fixColumn", colIdentifier: Object, target?: string, after?: boolean): Object; + igTreeGridColumnFixing(methodName: "fixNonDataColumns"): void; + igTreeGridColumnFixing(methodName: "fixDataSkippedColumns"): void; + igTreeGridColumnFixing(methodName: "unfixNonDataColumns"): void; + igTreeGridColumnFixing(methodName: "unfixDataSkippedColumns"): void; + igTreeGridColumnFixing(methodName: "unfixAllColumns"): void; + igTreeGridColumnFixing(methodName: "syncRowsHeights", $trs: any[], $anotherRows: any[]): void; + igTreeGridColumnFixing(methodName: "getWidthOfFixedColumns", fCols?: any[], excludeNonDataColumns?: boolean, includeHidden?: boolean): number; + + /** + * Gets the tooltip text on the column fixing header icon when column is not fixed. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "headerFixButtonText"): string; + + /** + * Sets the tooltip text on the column fixing header icon when column is not fixed. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "headerFixButtonText", optionValue: string): void; + + /** + * Gets the tooltip text on the column fixing header icon when column is fixed. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "headerUnfixButtonText"): string; + + /** + * Sets the tooltip text on the column fixing header icon when column is fixed. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "headerUnfixButtonText", optionValue: string): void; + + /** + * Gets whether to show the column fixing buttons in header cells/feature chooser. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons"): boolean; + + /** + * Sets whether to show the column fixing buttons in header cells/feature chooser. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "showFixButtons", optionValue: boolean): void; + + /** + * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights"): boolean; + + /** + * Enable row height sync for the fixed and unfixed portion of the grid. If you're observing row misalignment, please refer to [this article](http://www.igniteui.com/help/iggrid-known-issues#misalignment-ie9). + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "syncRowHeights", optionValue: boolean): void; + + /** + * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta"): number; + + /** + * Scroll delta in pixels when scrolling with the mouse wheel or the keyboard in the fixed columns area of the grid. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; + + /** + * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixingDirection"): string; + + /** + * Configures which side the fixed columns of the grid will be rendered on. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#direction) out of more information. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixingDirection", optionValue: string): void; + + /** + * List of column settings that specifies custom column fixing options on a per column basis. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnFixingColumnSetting[]; + + /** + * List of column settings that specifies custom column fixing options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnFixingColumnSetting[]): void; + + /** + * Text of the feature chooser button for fixing a currently unfixed column. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextFixedColumn"): string; + + /** + * Text of the feature chooser button for fixing a currently unfixed column. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextFixedColumn", optionValue: string): void; + + /** + * Text of the feature chooser button for unfixing a currently fixed column. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextUnfixedColumn"): string; + + /** + * Text of the feature chooser button for unfixing a currently fixed column. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "featureChooserTextUnfixedColumn", optionValue: string): void; + + /** + * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "minimalVisibleAreaWidth"): string|number; + + /** + * Minimal visible area in pixels for the unfixed columns. If the end user tries to fix a column(or columns), which causes the width of the fixed columns to grow such that the width of visible area of unfixed columns is less than this option then fixing will be canceled. Check [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#non-fixable-min-width) out for more information. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "minimalVisibleAreaWidth", optionValue: string|number): void; + + /** + * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns"): boolean; + + /** + * Specify initial fixing of all non data columns. Non-data columns are columns in the grid rendered for specific features, like the row selectors feature. The column containing the row numbering is such a column. This option is applicable when [fixingDirection](ui.iggridcolumnfixing#options:fixingDirection) is set to left. For a full column fixing configuration summary please refer to [this topic](http://www.igniteui.com/help/iggrid-columnfixing-configuring#configuration-summary). + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "fixNondataColumns", optionValue: boolean): void; + + /** + * When true all the TR DOM attributes of the unfixed row will be copied to the fixed row. Note that when enabled this option negatively affects performance when fixing a column. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "populateDataRowsAttributes"): boolean; + + /** + * When true all the TR DOM attributes of the unfixed row will be copied to the fixed row. Note that when enabled this option negatively affects performance when fixing a column. + * + * @optionValue New value to be set. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "populateDataRowsAttributes", optionValue: boolean): void; + + /** + * Event which is fired when column fixing operation is initiated. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnFixing"): ColumnFixingEvent; + + /** + * Event which is fired when column fixing operation is initiated. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnFixing", optionValue: ColumnFixingEvent): void; + + /** + * Event which is fired when column fixing operation is finished + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnFixed"): ColumnFixedEvent; + + /** + * Event which is fired when column fixing operation is finished + * + * @optionValue Define event handler function. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnFixed", optionValue: ColumnFixedEvent): void; + + /** + * Event which is fired when column unfixing operation is initiated + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixing"): ColumnUnfixingEvent; + + /** + * Event which is fired when column unfixing operation is initiated + * + * @optionValue Define event handler function. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixing", optionValue: ColumnUnfixingEvent): void; + + /** + * Event which is fired when column unfixing operation is done + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixed"): ColumnUnfixedEvent; + + /** + * Event which is fired when column unfixing operation is done + * + * @optionValue Define event handler function. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixed", optionValue: ColumnUnfixedEvent): void; + + /** + * Event which is fired when column fixing operation has failed - e.g. sum of the width of the fixed columns container and width of the column to be fixed exceeds the grid width + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnFixingRefused"): ColumnFixingRefusedEvent; + + /** + * Event which is fired when column fixing operation has failed - e.g. sum of the width of the fixed columns container and width of the column to be fixed exceeds the grid width + * + * @optionValue Define event handler function. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnFixingRefused", optionValue: ColumnFixingRefusedEvent): void; + + /** + * Event which is fired when column unfixing operation has failed - e.g.: there is only one fixed visible column(and tries to unfix it) and at least one fixed hidden column + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixingRefused"): ColumnUnfixingRefusedEvent; + + /** + * Event which is fired when column unfixing operation has failed - e.g.: there is only one fixed visible column(and tries to unfix it) and at least one fixed hidden column + * + * @optionValue Define event handler function. + */ + igTreeGridColumnFixing(optionLiteral: 'option', optionName: "columnUnfixingRefused", optionValue: ColumnUnfixingRefusedEvent): void; igTreeGridColumnFixing(options: IgTreeGridColumnFixing): JQuery; igTreeGridColumnFixing(optionLiteral: 'option', optionName: string): any; igTreeGridColumnFixing(optionLiteral: 'option', options: IgTreeGridColumnFixing): JQuery; @@ -71704,6 +79790,266 @@ interface JQuery { igTreeGridColumnFixing(methodName: string, ...methodParams: any[]): any; } interface IgTreeGridColumnMoving { + /** + * A list of column settings that specifies moving options on a per column basis. + * + */ + columnSettings?: IgGridColumnMovingColumnSetting[]; + + /** + * Specify the drag-and-drop mode for the feature + * + * + * Valid values: + * "immediate" Column headers will rearange as you drag with a space opening under the cursor for the header to be dropped on + * "deferred" A clone of the header dragged will be created and indicators will be shown between columns to help navigate the drop. + */ + mode?: string; + + /** + * Specify the way columns will be rearranged + * + * + * Valid values: + * "dom" Columns will be rearranged through dom manipulation + * "render" Columns will not be rearranged but the grid will be rendered again with the new column order. Please note this option is incompatible with immediate move mode. + */ + moveType?: string; + + /** + * Specifies if header cells should include an additional button that opens a moving helper dropdown. + * + */ + addMovingDropdown?: boolean; + + /** + * Specifies width of column moving dialog + * + */ + movingDialogWidth?: number; + + /** + * Specifies height of column moving dialog + * + */ + movingDialogHeight?: number; + + /** + * Specifies time in milliseconds for animation duration to show/hide modal dialog + * + */ + movingDialogAnimationDuration?: number; + + /** + * Specifies the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * + */ + movingAcceptanceTolerance?: number; + + /** + * Specifies the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * + */ + movingScrollTolerance?: number; + + /** + * Specifies a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * + */ + scrollSpeedMultiplier?: number; + + /** + * Specifies the length (in pixels) of each individual scroll operation + * + */ + scrollDelta?: number; + + /** + * Specifies whether the contents of the column being dragged will get hidden. The option is only + * relevant in immediate moving mode. + * + */ + hideHeaderContentsDuringDrag?: boolean; + + /** + * Specifies the opacity of the drag markup, while a column header is being dragged. + * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration + * will be used with priority over this one. + * + */ + dragHelperOpacity?: number; + + /** + * Specifies caption for each move down button in the column moving dialog + * + */ + movingDialogCaptionButtonDesc?: string; + + /** + * Specifies caption for each move up button in the column moving dialog + * + */ + movingDialogCaptionButtonAsc?: string; + + /** + * Specifies caption text for the column moving dialog + * + */ + movingDialogCaptionText?: string; + + /** + * Specifies caption text for the feature chooser entry + * + */ + movingDialogDisplayText?: string; + + /** + * Specifies text for drop tooltip in column moving dialog + * + */ + movingDialogDropTooltipText?: string; + + /** + * Specifies markup for drop tooltip in column moving dialog + * + */ + movingDialogDropTooltipMarkup?: string; + + /** + * Specifies caption for the move left dropdown button + * + */ + dropDownMoveLeftText?: string; + + /** + * Specifies caption for the move right dropdown button + * + */ + dropDownMoveRightText?: string; + + /** + * Specifies caption for the move first dropdown button + * + */ + dropDownMoveFirstText?: string; + + /** + * Specifies caption for the move last dropdown button + * + */ + dropDownMoveLastText?: string; + + /** + * Specifies tooltip text for the move indicator + * + */ + movingToolTipMove?: string; + + /** + * Specifies caption text for the feature chooser submenu button + * + */ + featureChooserSubmenuText?: string; + + /** + * Controls containment behavior of column moving dialog. + * + * owner The dialog will be draggable only in the grid area + * window The dialog will be draggable in the whole window area + */ + columnMovingDialogContainment?: 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 which is fired when a drag operation begins on a column header + */ + columnDragStart?: ColumnDragStartEvent; + + /** + * Event which is fired when a drag operation ends on a column header + */ + columnDragEnd?: ColumnDragEndEvent; + + /** + * Event which is fired when a drag operation is canceled + */ + columnDragCanceled?: ColumnDragCanceledEvent; + + /** + * Event which is fired when a column moving operation is initiated + */ + columnMoving?: ColumnMovingEvent; + + /** + * Event which is fired when a column moving operation completes + */ + columnMoved?: ColumnMovedEvent; + + /** + * Event fired before the moving dialog is opened. + */ + movingDialogOpening?: MovingDialogOpeningEvent; + + /** + * Event fired after the column chooser is already opened. + */ + movingDialogOpened?: MovingDialogOpenedEvent; + + /** + * Event fired every time the moving dialog changes its position. + */ + movingDialogDragged?: MovingDialogDraggedEvent; + + /** + * Event fired before the moving dialog is closed. + */ + movingDialogClosing?: MovingDialogClosingEvent; + + /** + * Event fired after the moving dialog has been closed. + */ + movingDialogClosed?: MovingDialogClosedEvent; + + /** + * Event fired before the contents of the model dialog are rendered. + */ + movingDialogContentsRendering?: MovingDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the model dialog are rendered. + */ + movingDialogContentsRendered?: MovingDialogContentsRenderedEvent; + + /** + * Event fired when move up button is pressed in the moving dialog + */ + movingDialogMoveUpButtonPressed?: MovingDialogMoveUpButtonPressedEvent; + + /** + * Event fired when move down button is pressed in the moving dialog + */ + movingDialogMoveDownButtonPressed?: MovingDialogMoveDownButtonPressedEvent; + + /** + * Event fired when column moving is initiated through dragging it in the moving dialog + */ + movingDialogDragColumnMoving?: MovingDialogDragColumnMovingEvent; + + /** + * Event fired when column moving is completed through dragging it in the moving dialog + */ + movingDialogDragColumnMoved?: MovingDialogDragColumnMovedEvent; + /** * Option for igTreeGridColumnMoving */ @@ -71711,6 +80057,18 @@ interface IgTreeGridColumnMoving { } interface IgTreeGridColumnMovingMethods { destroy(): void; + + /** + * Moves a visible column at a specified place, in front or behind a target column or at a target index + * 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 of the column to be moved. It can be a key, a Multi-Column Header identificator, or an index in a number format. The latter is not supported when the grid contains multi-column headers. + * @param target An identifier of a column where the moved column should move to or an index at which the moved column should be moved to. In the case of a column identifier the column will be moved after it by default. + * @param after Specifies whether the column moved should be moved after or before the target column. + * @param inDom Specifies whether the column moving will be enacted through DOM manipulation or through rerendering of the grid. + * @param callback Specifies a custom function to be called when the column is moved. + */ + moveColumn(column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; } interface JQuery { data(propertyName: "igTreeGridColumnMoving"): IgTreeGridColumnMovingMethods; @@ -71718,6 +80076,599 @@ interface JQuery { interface JQuery { igTreeGridColumnMoving(methodName: "destroy"): void; + igTreeGridColumnMoving(methodName: "moveColumn", column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; + + /** + * A list of column settings that specifies moving options on a per column basis. + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings"): IgGridColumnMovingColumnSetting[]; + + /** + * A list of column settings that specifies moving options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridColumnMovingColumnSetting[]): void; + + /** + * Specify the drag-and-drop mode for the feature + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Specify the drag-and-drop mode for the feature + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Specify the way columns will be rearranged + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "moveType"): string; + + /** + * Specify the way columns will be rearranged + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "moveType", optionValue: string): void; + + /** + * Gets if header cells should include an additional button that opens a moving helper dropdown. + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown"): boolean; + + /** + * Sets if header cells should include an additional button that opens a moving helper dropdown. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "addMovingDropdown", optionValue: boolean): void; + + /** + * Gets width of column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth"): number; + + /** + * Sets width of column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogWidth", optionValue: number): void; + + /** + * Gets height of column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight"): number; + + /** + * Sets height of column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogHeight", optionValue: number): void; + + /** + * Gets time in milliseconds for animation duration to show/hide modal dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration"): number; + + /** + * Sets time in milliseconds for animation duration to show/hide modal dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogAnimationDuration", optionValue: number): void; + + /** + * Gets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance"): number; + + /** + * Sets the length (in pixels) between the dragged column and the column edges below which the move operation is accepted + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingAcceptanceTolerance", optionValue: number): void; + + /** + * Gets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance"): number; + + /** + * Sets the length (in pixels) between the dragged column and the grid edges below which horizontal scrolling occurs + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingScrollTolerance", optionValue: number): void; + + /** + * Gets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier"): number; + + /** + * Sets a multiplier for the delay between subsequent scroll operations. The larger this number is, the slower scrolling will appear to be. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollSpeedMultiplier", optionValue: number): void; + + /** + * Gets the length (in pixels) of each individual scroll operation + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta"): number; + + /** + * Sets the length (in pixels) of each individual scroll operation + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "scrollDelta", optionValue: number): void; + + /** + * Gets whether the contents of the column being dragged will get hidden. The option is only + * relevant in immediate moving mode. + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag"): boolean; + + /** + * Sets whether the contents of the column being dragged will get hidden. The option is only + * relevant in immediate moving mode. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "hideHeaderContentsDuringDrag", optionValue: boolean): void; + + /** + * Gets the opacity of the drag markup, while a column header is being dragged. + * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration + * will be used with priority over this one. + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity"): number; + + /** + * Sets the opacity of the drag markup, while a column header is being dragged. + * The value must be between 0 and 1. When GroupBy is enabled, the corresponding option in the GroupBy configuration + * will be used with priority over this one. + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dragHelperOpacity", optionValue: number): void; + + /** + * Gets caption for each move down button in the column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonDesc"): string; + + /** + * Sets caption for each move down button in the column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonDesc", optionValue: string): void; + + /** + * Gets caption for each move up button in the column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonAsc"): string; + + /** + * Sets caption for each move up button in the column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionButtonAsc", optionValue: string): void; + + /** + * Gets caption text for the column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionText"): string; + + /** + * Sets caption text for the column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogCaptionText", optionValue: string): void; + + /** + * Gets caption text for the feature chooser entry + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDisplayText"): string; + + /** + * Sets caption text for the feature chooser entry + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDisplayText", optionValue: string): void; + + /** + * Gets text for drop tooltip in column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipText"): string; + + /** + * Sets text for drop tooltip in column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipText", optionValue: string): void; + + /** + * Gets markup for drop tooltip in column moving dialog + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup"): string; + + /** + * Sets markup for drop tooltip in column moving dialog + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDropTooltipMarkup", optionValue: string): void; + + /** + * Gets caption for the move left dropdown button + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLeftText"): string; + + /** + * Sets caption for the move left dropdown button + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLeftText", optionValue: string): void; + + /** + * Gets caption for the move right dropdown button + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveRightText"): string; + + /** + * Sets caption for the move right dropdown button + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveRightText", optionValue: string): void; + + /** + * Gets caption for the move first dropdown button + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveFirstText"): string; + + /** + * Sets caption for the move first dropdown button + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveFirstText", optionValue: string): void; + + /** + * Gets caption for the move last dropdown button + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLastText"): string; + + /** + * Sets caption for the move last dropdown button + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dropDownMoveLastText", optionValue: string): void; + + /** + * Gets tooltip text for the move indicator + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingToolTipMove"): string; + + /** + * Sets tooltip text for the move indicator + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingToolTipMove", optionValue: string): void; + + /** + * Gets caption text for the feature chooser submenu button + * + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "featureChooserSubmenuText"): string; + + /** + * Sets caption text for the feature chooser submenu button + * + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "featureChooserSubmenuText", optionValue: string): void; + + /** + * Controls containment behavior of column moving dialog. + * + * owner The dialog will be draggable only in the grid area + * window The dialog will be draggable in the whole window area + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnMovingDialogContainment"): string; + + /** + * Controls containment behavior of column moving dialog. + * + * owner The dialog will be draggable only in the grid area + * window The dialog will be draggable in the whole window area + * + * @optionValue New value to be set. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnMovingDialogContainment", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igTreeGridColumnMoving(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. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables feature inheritance for the child layouts. NOTE: It only applies for igHierarchicalGrid. + */ + igTreeGridColumnMoving(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. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event which is fired when a drag operation begins on a column header + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnDragStart"): ColumnDragStartEvent; + + /** + * Event which is fired when a drag operation begins on a column header + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnDragStart", optionValue: ColumnDragStartEvent): void; + + /** + * Event which is fired when a drag operation ends on a column header + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnDragEnd"): ColumnDragEndEvent; + + /** + * Event which is fired when a drag operation ends on a column header + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnDragEnd", optionValue: ColumnDragEndEvent): void; + + /** + * Event which is fired when a drag operation is canceled + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnDragCanceled"): ColumnDragCanceledEvent; + + /** + * Event which is fired when a drag operation is canceled + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnDragCanceled", optionValue: ColumnDragCanceledEvent): void; + + /** + * Event which is fired when a column moving operation is initiated + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnMoving"): ColumnMovingEvent; + + /** + * Event which is fired when a column moving operation is initiated + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnMoving", optionValue: ColumnMovingEvent): void; + + /** + * Event which is fired when a column moving operation completes + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnMoved"): ColumnMovedEvent; + + /** + * Event which is fired when a column moving operation completes + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "columnMoved", optionValue: ColumnMovedEvent): void; + + /** + * Event fired before the moving dialog is opened. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpening"): MovingDialogOpeningEvent; + + /** + * Event fired before the moving dialog is opened. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpening", optionValue: MovingDialogOpeningEvent): void; + + /** + * Event fired after the column chooser is already opened. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpened"): MovingDialogOpenedEvent; + + /** + * Event fired after the column chooser is already opened. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogOpened", optionValue: MovingDialogOpenedEvent): void; + + /** + * Event fired every time the moving dialog changes its position. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragged"): MovingDialogDraggedEvent; + + /** + * Event fired every time the moving dialog changes its position. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragged", optionValue: MovingDialogDraggedEvent): void; + + /** + * Event fired before the moving dialog is closed. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosing"): MovingDialogClosingEvent; + + /** + * Event fired before the moving dialog is closed. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosing", optionValue: MovingDialogClosingEvent): void; + + /** + * Event fired after the moving dialog has been closed. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosed"): MovingDialogClosedEvent; + + /** + * Event fired after the moving dialog has been closed. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogClosed", optionValue: MovingDialogClosedEvent): void; + + /** + * Event fired before the contents of the model dialog are rendered. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendering"): MovingDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the model dialog are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendering", optionValue: MovingDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the model dialog are rendered. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendered"): MovingDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the model dialog are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogContentsRendered", optionValue: MovingDialogContentsRenderedEvent): void; + + /** + * Event fired when move up button is pressed in the moving dialog + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveUpButtonPressed"): MovingDialogMoveUpButtonPressedEvent; + + /** + * Event fired when move up button is pressed in the moving dialog + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveUpButtonPressed", optionValue: MovingDialogMoveUpButtonPressedEvent): void; + + /** + * Event fired when move down button is pressed in the moving dialog + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveDownButtonPressed"): MovingDialogMoveDownButtonPressedEvent; + + /** + * Event fired when move down button is pressed in the moving dialog + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogMoveDownButtonPressed", optionValue: MovingDialogMoveDownButtonPressedEvent): void; + + /** + * Event fired when column moving is initiated through dragging it in the moving dialog + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoving"): MovingDialogDragColumnMovingEvent; + + /** + * Event fired when column moving is initiated through dragging it in the moving dialog + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoving", optionValue: MovingDialogDragColumnMovingEvent): void; + + /** + * Event fired when column moving is completed through dragging it in the moving dialog + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoved"): MovingDialogDragColumnMovedEvent; + + /** + * Event fired when column moving is completed through dragging it in the moving dialog + * + * @optionValue Define event handler function. + */ + igTreeGridColumnMoving(optionLiteral: 'option', optionName: "movingDialogDragColumnMoved", optionValue: MovingDialogDragColumnMovedEvent): void; igTreeGridColumnMoving(options: IgTreeGridColumnMoving): JQuery; igTreeGridColumnMoving(optionLiteral: 'option', optionName: string): any; igTreeGridColumnMoving(optionLiteral: 'option', options: IgTreeGridColumnMoving): JQuery; @@ -71768,6 +80719,411 @@ interface IgTreeGridFiltering { */ filterSummaryInPagerTemplate?: string; + /** + * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * + */ + caseSensitive?: boolean; + + /** + * Enable/disable footer visibility with summary info about the filter. + * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). + * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * + */ + filterSummaryAlwaysVisible?: boolean; + + /** + * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * + */ + renderFC?: boolean; + + /** + * Summary template that will appear in the bottom left corner of the footer. Has the format '${matches} matching records'. + * + */ + filterSummaryTemplate?: string; + + /** + * Type of animations for the column filter dropdowns. + * + * + * Valid values: + * "linear" The column filtering drop downs are shown with a linear animation. + * "none" No animation is used when showing the filtering drop downs. + */ + filterDropDownAnimations?: string; + + /** + * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * + */ + filterDropDownAnimationDuration?: number; + + /** + * Width of the column filter dropdowns. + * + * + * Valid values: + * "string" The width in pixels (0px) + * "number" The width in pixels as a number (0) + */ + filterDropDownWidth?: string|number; + + /** + * Height of the column filter dropdowns. + * + * string The height of the column filter dropdowns in pixels (0px). + * number The height of the column filter dropdowns in pixels as a number (0). + */ + filterDropDownHeight?: any; + + /** + * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + */ + filterExprUrlKey?: string; + + /** + * Enable/disable filter icons visibility. + * + * + * Valid values: + * "true" All predefined filters in the filter dropdowns will have icons rendered in front of the text. + * "false" No icons will be rendered. + */ + filterDropDownItemIcons?: boolean; + + /** + * A list of column settings that specifies custom filtering options on a per column basis. + * + */ + columnSettings?: IgGridFilteringColumnSetting[]; + + /** + * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * + * + * Valid values: + * "remote" Filtering is performed by a remote end-point. + * "local" Filtering is performed locally by the [$.ig.DataSource](ig.datasource). + */ + type?: string; + + /** + * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * + */ + filterDelay?: number; + + /** + * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * + * + * Valid values: + * "simple" Renders just a filter row. + * "advanced" Allows to configure multiple filters from a dialog - Excel style. + */ + mode?: string; + + /** + * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * + */ + advancedModeEditorsVisible?: boolean; + + /** + * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * + * + * Valid values: + * "left" + * "right" + */ + advancedModeHeaderButtonLocation?: string; + + /** + * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * Valid values: + * "string" The dialog window width in pixels (370px). + * "number" The dialog window width in pixels as a number (370). + */ + filterDialogWidth?: string|number; + + /** + * default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * Valid values: + * "string" The dialog window height in pixels (350px). + * "number" The dialog window height in pixels as a number (350). + */ + filterDialogHeight?: string|number; + + /** + * Width of the filtering condition dropdowns in the advanced filter dialog. + * + * + * Valid values: + * "string" The filtering condition dropdowns width in pixels (80px). + * "number" The filtering condition dropdowns width in pixels as a number (80). + */ + filterDialogFilterDropDownDefaultWidth?: string|number; + + /** + * Width of the filtering expression input boxes in the advanced filter dialog. + * + * + * Valid values: + * "string" The filtering expression input boxes width in pixels (80px). + * "number" The filtering expression input boxes width in pixels as a number (80). + */ + filterDialogExprInputDefaultWidth?: string|number; + + /** + * Width of the column chooser dropdowns in the advanced filter dialog. + * + * + * Valid values: + * "string" The column chooser dropdowns width in pixels (80px). + * "number" The column chooser dropdowns width in pixels as a number (80). + */ + filterDialogColumnDropDownDefaultWidth?: string|number; + + /** + * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * + */ + renderFilterButton?: boolean; + + /** + * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * + * + * Valid values: + * "left" The button is rendered on the left. + * "right" The button is rendered on the right. + */ + filterButtonLocation?: string; + + /** + * List of configurable and localized null texts that will be used for the filter editors. + * + */ + nullTexts?: IgGridFilteringNullTexts; + + /** + * A list of configurable and localized labels that are used for the predefined filtering conditions in the filter dropdowns. + * + */ + labels?: IgGridFilteringLabels; + + /** + * Custom tooltip template for the filter button, when a filter is applied. + * + */ + tooltipTemplate?: string; + + /** + * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * + */ + filterDialogAddConditionTemplate?: string; + + /** + * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * + */ + filterDialogAddConditionDropDownTemplate?: string; + + /** + * Custom template for filter dialog. + * Each DOM element which is used for selecting filter conditions/columns/filter expressions has "data-*" attribute. + * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". + * NOTE: The template is supported only with . + * The default template is " ". + * + */ + filterDialogFilterTemplate?: string; + + /** + * Custom template for options in condition list in filter dialog. The default template is "". + * + */ + filterDialogFilterConditionTemplate?: string; + + /** + * Add button width - in the advanced filter dialog. + * + * + * Valid values: + * "string" The dialog Add button width in pixels (100px). + * "number" The dialog Add button width in pixels as a number (100). + */ + filterDialogAddButtonWidth?: string|number; + + /** + * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * + * + * Valid values: + * "string" The advanced filter dialog Ok and Cancel buttons width in pixels (120px). + * "number" The advanced filter dialog Ok and Cancel buttons width in pixels as a number (120). + */ + filterDialogOkCancelButtonWidth?: string|number; + + /** + * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * + */ + filterDialogMaxFilterCount?: number; + + /** + * Controls containment behavior. + * + * owner The filter dialog will be draggable only within the grid area. + * window The filter dialog will be draggable within the whole window area. + */ + filterDialogContainment?: string; + + /** + * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * + */ + showEmptyConditions?: boolean; + + /** + * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * + */ + showNullConditions?: boolean; + + /** + * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + featureChooserText?: string; + + /** + * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + featureChooserTextHide?: string; + + /** + * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * + */ + featureChooserTextAdvancedFilter?: string; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + dialogWidget?: string; + + /** + * Enables/disables filtering persistence between states. + * + */ + persist?: boolean; + + /** + * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * + */ + inherit?: boolean; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + */ + dataFiltering?: DataFilteringEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + dataFiltered?: DataFilteredEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + dropDownOpening?: DropDownOpeningEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + dropDownOpened?: DropDownOpenedEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + dropDownClosing?: DropDownClosingEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + dropDownClosed?: DropDownClosedEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + filterDialogOpening?: FilterDialogOpeningEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + filterDialogOpened?: FilterDialogOpenedEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + filterDialogMoving?: FilterDialogMovingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + filterDialogFilterAdding?: FilterDialogFilterAddingEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + filterDialogFilterAdded?: FilterDialogFilterAddedEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + filterDialogClosing?: FilterDialogClosingEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + filterDialogClosed?: FilterDialogClosedEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + filterDialogContentsRendering?: FilterDialogContentsRenderingEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + filterDialogContentsRendered?: FilterDialogContentsRenderedEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + filterDialogFiltering?: FilterDialogFilteringEvent; + /** * Option for igTreeGridFiltering */ @@ -71779,6 +81135,29 @@ interface IgTreeGridFilteringMethods { */ getFilteringMatchesCount(): number; destroy(): void; + + /** + * Toggle filter row when mode is simple or [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is true. Otherwise show/hide advanced dialog. + * + * @param event Column key + */ + toggleFilterRowByFeatureChooser(event: string): void; + + /** + * Applies filtering programmatically and updates the UI by default. + * + * @param expressions An array of filtering expressions, each one having the format {fieldName: , expr: , cond: , logic: } where fieldName is the key of the column, expr is the actual expression string with which we would like to filter, logic is 'AND' or 'OR', and cond is one of the following strings: "equals", "doesNotEqual", "contains", "doesNotContain", "greaterThan", "lessThan", "greaterThanOrEqualTo", "lessThanOrEqualTo", "true", "false", "null", "notNull", "empty", "notEmpty", "startsWith", "endsWith", "today", "yesterday", "on", "notOn", "thisMonth", "lastMonth", "nextMonth", "before", "after", "thisYear", "lastYear", "nextYear". The difference between the empty and null filtering conditions is that empty includes null, NaN, and undefined, as well as the empty string. + * @param updateUI specifies whether the filter row should be also updated once the grid is filtered + * @param addedFromAdvanced + */ + filter(expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + + /** + * Check whether filterCondition requires or not filtering expression - e.g. if filterCondition is "lastMonth", "thisMonth", "null", "notNull", "true", "false", etc. then filtering expression is NOT required + * + * @param filterCondition filtering condition - e.g. "true", "false", "yesterday", "empty", "null", etc. + */ + requiresFilteringExpression(filterCondition: string): boolean; } interface JQuery { data(propertyName: "igTreeGridFiltering"): IgTreeGridFilteringMethods; @@ -71787,6 +81166,9 @@ interface JQuery { interface JQuery { igTreeGridFiltering(methodName: "getFilteringMatchesCount"): number; igTreeGridFiltering(methodName: "destroy"): void; + igTreeGridFiltering(methodName: "toggleFilterRowByFeatureChooser", event: string): void; + igTreeGridFiltering(methodName: "filter", expressions: any[], updateUI?: boolean, addedFromAdvanced?: boolean): void; + igTreeGridFiltering(methodName: "requiresFilteringExpression", filterCondition: string): boolean; /** * The property in the response that will hold the total number of records in the data source @@ -71885,6 +81267,820 @@ interface JQuery { * @optionValue New value to be set. */ igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryInPagerTemplate", optionValue: string): void; + + /** + * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "caseSensitive"): boolean; + + /** + * Enables or disables the filtering case sensitivity. Works only for local filtering. If true, it case sensitive filtering is performed. If false, filtering is case insensitive. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "caseSensitive", optionValue: boolean): void; + + /** + * Enable/disable footer visibility with summary info about the filter. + * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). + * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible"): boolean; + + /** + * Enable/disable footer visibility with summary info about the filter. + * When false, the filter summary row (in the footer) will only be visible when paging is enabled (or some other feature that renders a footer). + * When true, the filter summary row will only be visible when a filter is applied i.e. it's not visible by default. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryAlwaysVisible", optionValue: boolean): void; + + /** + * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFC"): boolean; + + /** + * Render in [Feature Chooser](http://www.igniteui.com/help/iggrid-feature-chooser) + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFC", optionValue: boolean): void; + + /** + * Summary template that will appear in the bottom left corner of the footer. Has the format '${matches} matching records'. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryTemplate"): string; + + /** + * Summary template that will appear in the bottom left corner of the footer. Has the format '${matches} matching records'. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterSummaryTemplate", optionValue: string): void; + + /** + * Type of animations for the column filter dropdowns. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimations"): string; + + /** + * Type of animations for the column filter dropdowns. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimations", optionValue: string): void; + + /** + * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration"): number; + + /** + * Animation duration in milliseconds for the [filterDropDownAnimations](ui.iggridfiltering#options:filterDropDownAnimations). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownAnimationDuration", optionValue: number): void; + + /** + * Width of the column filter dropdowns. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownWidth"): string|number; + + /** + * Width of the column filter dropdowns. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownWidth", optionValue: string|number): void; + + /** + * Height of the column filter dropdowns. + * + * string The height of the column filter dropdowns in pixels (0px). + * number The height of the column filter dropdowns in pixels as a number (0). + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownHeight"): any; + + /** + * Height of the column filter dropdowns. + * + * string The height of the column filter dropdowns in pixels (0px). + * number The height of the column filter dropdowns in pixels as a number (0). + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownHeight", optionValue: any): void; + + /** + * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey"): string; + + /** + * URL key name that specifies how the filtering expressions will be encoded for remote requests, e.g. &filter('col') = startsWith. Default is OData. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterExprUrlKey", optionValue: string): void; + + /** + * Enable/disable filter icons visibility. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownItemIcons"): boolean; + + /** + * Enable/disable filter icons visibility. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDropDownItemIcons", optionValue: boolean): void; + + /** + * A list of column settings that specifies custom filtering options on a per column basis. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "columnSettings"): IgGridFilteringColumnSetting[]; + + /** + * A list of column settings that specifies custom filtering options on a per column basis. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "columnSettings", optionValue: IgGridFilteringColumnSetting[]): void; + + /** + * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "type"): string; + + /** + * Type of filtering. Delegates all filtering functionality to the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "type", optionValue: string): void; + + /** + * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDelay"): number; + + /** + * Time in milliseconds for which widget will wait between keystrokes before sending filtering requests. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDelay", optionValue: number): void; + + /** + * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "mode"): string; + + /** + * Default is 'simple' for non-virtualized grids, and 'advanced' when [virtualization](ui.iggrid#options:virtualization) is enabled. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "mode", optionValue: string): void; + + /** + * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible"): boolean; + + /** + * Defines whether to render editors in advanced [mode](ui.iggridfiltering#options:mode). If false, no editors will be rendered in the advanced [mode](ui.iggridfiltering#options:mode). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeEditorsVisible", optionValue: boolean): void; + + /** + * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeHeaderButtonLocation"): string; + + /** + * Location of the advanced filtering button when [advancedModeEditorsVisible](ui.iggridfiltering#options:advancedModeEditorsVisible) is false (i.e. when the button is rendered in the header). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "advancedModeHeaderButtonLocation", optionValue: string): void; + + /** + * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogWidth"): string|number; + + /** + * Default filter dialog width (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogWidth", optionValue: string|number): void; + + /** + * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogHeight"): string|number; + + /** + * Default filter dialog height (used for Advanced filtering [mode](ui.iggridfiltering#options:mode)). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogHeight", optionValue: string|number): void; + + /** + * Width of the filtering condition dropdowns in the advanced filter dialog. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterDropDownDefaultWidth"): string|number; + + /** + * Width of the filtering condition dropdowns in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterDropDownDefaultWidth", optionValue: string|number): void; + + /** + * Width of the filtering expression input boxes in the advanced filter dialog. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogExprInputDefaultWidth"): string|number; + + /** + * Width of the filtering expression input boxes in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogExprInputDefaultWidth", optionValue: string|number): void; + + /** + * Width of the column chooser dropdowns in the advanced filter dialog. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogColumnDropDownDefaultWidth"): string|number; + + /** + * Width of the column chooser dropdowns in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogColumnDropDownDefaultWidth", optionValue: string|number): void; + + /** + * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton"): boolean; + + /** + * Enable/disable filter button visibility. If false, no filter dropdown buttons will be rendered and a predefined list of filters will not be rendered for the columns. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "renderFilterButton", optionValue: boolean): void; + + /** + * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterButtonLocation"): string; + + /** + * The filtering button for filter dropdowns can be rendered either on the left of the filter editor, or on the right. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterButtonLocation", optionValue: string): void; + + /** + * List of configurable and localized null texts that will be used for the filter editors. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "nullTexts"): IgGridFilteringNullTexts; + + /** + * List of configurable and localized null texts that will be used for the filter editors. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "nullTexts", optionValue: IgGridFilteringNullTexts): void; + + /** + * A list of configurable and localized labels that are used for the predefined filtering conditions in the filter dropdowns. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "labels"): IgGridFilteringLabels; + + /** + * A list of configurable and localized labels that are used for the predefined filtering conditions in the filter dropdowns. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "labels", optionValue: IgGridFilteringLabels): void; + + /** + * Custom tooltip template for the filter button, when a filter is applied. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "tooltipTemplate"): string; + + /** + * Custom tooltip template for the filter button, when a filter is applied. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "tooltipTemplate", optionValue: string): void; + + /** + * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate"): string; + + /** + * Custom template for add condition area in the filter dialog. The default template is "
${label1}
${label2}
". + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionTemplate", optionValue: string): void; + + /** + * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate"): string; + + /** + * Custom template for options in dropdown in add condition area in the filter dialog. The default template is "". + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddConditionDropDownTemplate", optionValue: string): void; + + /** + * Custom template for filter dialog. + * Each DOM element which is used for selecting filter conditions/columns/filter expressions has "data-*" attribute. + * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". + * NOTE: The template is supported only with . + * The default template is " ". + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate"): string; + + /** + * Custom template for filter dialog. + * Each DOM element which is used for selecting filter conditions/columns/filter expressions has "data-*" attribute. + * E.g.: DOM element used for selecting column has attribute "data-af-col", for selecting filter condition - "data-af-cond", for filter expression- "data-af-expr". + * NOTE: The template is supported only with . + * The default template is " ". + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterTemplate", optionValue: string): void; + + /** + * Custom template for options in condition list in filter dialog. The default template is "". + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate"): string; + + /** + * Custom template for options in condition list in filter dialog. The default template is "". + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterConditionTemplate", optionValue: string): void; + + /** + * Add button width - in the advanced filter dialog. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddButtonWidth"): string|number; + + /** + * Add button width - in the advanced filter dialog. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogAddButtonWidth", optionValue: string|number): void; + + /** + * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOkCancelButtonWidth"): string|number; + + /** + * Width of the Ok and Cancel buttons in the advanced filtering dialogs. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOkCancelButtonWidth", optionValue: string|number): void; + + /** + * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount"): number; + + /** + * Maximum number of filter rows in the advanced filtering dialog. If this number is exceeded, an error message will be rendered. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMaxFilterCount", optionValue: number): void; + + /** + * Controls containment behavior. + * + * owner The filter dialog will be draggable only within the grid area. + * window The filter dialog will be draggable within the whole window area. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContainment"): string; + + /** + * Controls containment behavior. + * + * owner The filter dialog will be draggable only within the grid area. + * window The filter dialog will be draggable within the whole window area. + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContainment", optionValue: string): void; + + /** + * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions"): boolean; + + /** + * Enable/disable empty condition visibility in the filter. If true, shows empty and not empty filtering conditions in the dropdowns. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "showEmptyConditions", optionValue: boolean): void; + + /** + * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "showNullConditions"): boolean; + + /** + * Enable/disable visibility of null and not null filtering conditions in the dropdowns. If true, shows null and not null filtering conditions in the dropdowns. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "showNullConditions", optionValue: boolean): void; + + /** + * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "featureChooserText"): string; + + /** + * Feature chooser text when filter is shown and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "featureChooserText", optionValue: string): void; + + /** + * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextHide"): string; + + /** + * Feature chooser text when filter is hidden and filter [mode](ui.iggridfiltering#options:mode) is simple. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextHide", optionValue: string): void; + + /** + * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextAdvancedFilter"): string; + + /** + * Feature chooser text when filter [mode](ui.iggridfiltering#options:mode) is advanced. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "featureChooserTextAdvancedFilter", optionValue: string): void; + + /** + * Name of the dialog widget to be used. It should inherit from $.ui.igGridModalDialog. + * + */ + igTreeGridFiltering(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. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dialogWidget", optionValue: string): void; + + /** + * Enables/disables filtering persistence between states. + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "persist"): boolean; + + /** + * Enables/disables filtering persistence between states. + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "persist", optionValue: boolean): void; + + /** + * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "inherit"): boolean; + + /** + * Enables/disables feature inheritance for the child [layouts](ui.ighierarchicalgrid#options:columnLayouts). NOTE: It only applies for [igHierarchicalGrid](ui.ighierarchicalgrid). + * + * + * @optionValue New value to be set. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "inherit", optionValue: boolean): void; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltering"): DataFilteringEvent; + + /** + * Event fired before a filtering operation is executed (remote request or local). + * Return false in order to cancel filtering operation. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltering", optionValue: DataFilteringEvent): void; + + /** + * Event fired after the filtering has been executed and results are rendered. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltered"): DataFilteredEvent; + + /** + * Event fired after the filtering has been executed and results are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dataFiltered", optionValue: DataFilteredEvent): void; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening"): DropDownOpeningEvent; + + /** + * Event fired before the filter dropdown is opened for a specific column. + * Return false in order to cancel dropdown opening. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpening", optionValue: DropDownOpeningEvent): void; + + /** + * Event fired after the filter dropdown is opened for a specific column. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened"): DropDownOpenedEvent; + + /** + * Event fired after the filter dropdown is opened for a specific column. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownOpened", optionValue: DropDownOpenedEvent): void; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing"): DropDownClosingEvent; + + /** + * Event fired before the filter dropdown starts closing. + * Return false in order to cancel dropdown closing. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosing", optionValue: DropDownClosingEvent): void; + + /** + * Event fired after a filter column dropdown is completely closed. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed"): DropDownClosedEvent; + + /** + * Event fired after a filter column dropdown is completely closed. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "dropDownClosed", optionValue: DropDownClosedEvent): void; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening"): FilterDialogOpeningEvent; + + /** + * Event fired before the advanced filtering dialog is opened. + * Return false in order to cancel filter dialog opening. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpening", optionValue: FilterDialogOpeningEvent): void; + + /** + * Event fired after the advanced filter dialog is already opened. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened"): FilterDialogOpenedEvent; + + /** + * Event fired after the advanced filter dialog is already opened. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogOpened", optionValue: FilterDialogOpenedEvent): void; + + /** + * Event fired every time the advanced filter dialog changes its position. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving"): FilterDialogMovingEvent; + + /** + * Event fired every time the advanced filter dialog changes its position. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogMoving", optionValue: FilterDialogMovingEvent): void; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding"): FilterDialogFilterAddingEvent; + + /** + * Event fired before a filter row is added to the advanced filter dialog. + * Return false in order to cancel filter adding to the advanced filtering dialog. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdding", optionValue: FilterDialogFilterAddingEvent): void; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded"): FilterDialogFilterAddedEvent; + + /** + * Event fired after a filter row is added to the advanced filter dialog. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFilterAdded", optionValue: FilterDialogFilterAddedEvent): void; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing"): FilterDialogClosingEvent; + + /** + * Event fired before the advanced filter dialog is closed. + * Return false in order to cancel filtering dialog closing. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosing", optionValue: FilterDialogClosingEvent): void; + + /** + * Event fired after the advanced filter dialog has been closed. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed"): FilterDialogClosedEvent; + + /** + * Event fired after the advanced filter dialog has been closed. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogClosed", optionValue: FilterDialogClosedEvent): void; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering"): FilterDialogContentsRenderingEvent; + + /** + * Event fired before the contents of the advanced filter dialog are rendered. + * Return false in order to cancel filtering dialog rendering. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendering", optionValue: FilterDialogContentsRenderingEvent): void; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered"): FilterDialogContentsRenderedEvent; + + /** + * Event fired after the contents of the advanced filter dialog are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogContentsRendered", optionValue: FilterDialogContentsRenderedEvent): void; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering"): FilterDialogFilteringEvent; + + /** + * Event fired when the OK button in the advanced filter dialog is pressed. + * + * @optionValue Define event handler function. + */ + igTreeGridFiltering(optionLiteral: 'option', optionName: "filterDialogFiltering", optionValue: FilterDialogFilteringEvent): void; igTreeGridFiltering(options: IgTreeGridFiltering): JQuery; igTreeGridFiltering(optionLiteral: 'option', optionName: string): any; igTreeGridFiltering(optionLiteral: 'option', options: IgTreeGridFiltering): JQuery; @@ -72010,153 +82206,81 @@ interface IgTreeGridHiding { /** * 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; @@ -72525,21 +82649,11 @@ interface JQuery { /** * 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. */ @@ -72547,19 +82661,11 @@ interface JQuery { /** * 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. */ @@ -72567,19 +82673,11 @@ interface JQuery { /** * 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. */ @@ -72587,19 +82685,11 @@ interface JQuery { /** * 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. */ @@ -72607,21 +82697,11 @@ interface JQuery { /** * 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. */ @@ -72629,21 +82709,11 @@ interface JQuery { /** * 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. */ @@ -72651,21 +82721,11 @@ interface JQuery { /** * 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. */ @@ -72673,19 +82733,11 @@ interface JQuery { /** * 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. */ @@ -72693,19 +82745,11 @@ interface JQuery { /** * 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. */ @@ -72713,23 +82757,11 @@ interface JQuery { /** * 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. */ @@ -72737,19 +82769,11 @@ interface JQuery { /** * 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. */ @@ -72757,19 +82781,11 @@ interface JQuery { /** * 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. */ @@ -72777,19 +82793,11 @@ interface JQuery { /** * 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. */ @@ -72797,19 +82805,11 @@ interface JQuery { /** * 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. */ @@ -72817,23 +82817,11 @@ interface JQuery { /** * 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. */ @@ -72841,19 +82829,11 @@ interface JQuery { /** * 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. */ @@ -72866,16 +82846,30 @@ interface JQuery { } interface IgTreeGridDataSourceSettings { /** + * *** IMPORTANT DEPRECATED *** Use the expandedKey option instead. * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. * */ - propertyExpanded?: string; + propertyExpanded?: any; + + /** + * *** IMPORTANT DEPRECATED *** Use the dataLevelKey option instead. + * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. + * + */ + propertyDataLevel?: any; + + /** + * The name of the property that keeps track of the expansion state of a data item. Defaults to __ig_options.expanded. + * + */ + expandedKey?: string; /** * The name of the property that keeps track of the level in the hierarchy.Defaults to __ig_options.dataLevel. * */ - propertyDataLevel?: string; + dataLevelKey?: 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) @@ -72974,44 +82968,490 @@ interface IgTreeGrid { */ dataSourceSettings?: IgTreeGridDataSourceSettings; + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * Valid values: + * "string" The widget width can be set in pixels (px) or percentage (%). Example values: "800px", "800" (defaults to pixels), "100%". + * "number" The widget width can be set in pixels as a number. Example values: 800, 700. + * "null" will stretch to fit the sum of the columns widths. + */ + 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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * 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. + */ + height?: string|number; + + /** + * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + */ + autoAdjustHeight?: boolean; + + /** + * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + * + * Valid values: + * "string" The avarage row height can be set in pixels ("25px"). + * "number" The avarage row height can be set in pixels as a number (25). + */ + avgRowHeight?: string|number; + + /** + * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + * + * Valid values: + * "string" The avarage column width can be set in pixels ("25px"). + * "number" The avarage column width can be set in pixels as a number (25). + */ + avgColumnWidth?: string|number; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * + * + * Valid values: + * "string" The default column width can be set in pixels ("100px"). + * "number" The default column width can be set in pixels as a number (100). + */ + defaultColumnWidth?: string|number; + + /** + * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * + */ + autoGenerateColumns?: boolean; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + */ + virtualization?: boolean; + + /** + * Determines row virtualization mode. + * + * + * Valid values: + * "fixed" Renders only the visible rows and/or columns in the grid. On scrolling the same rows and/or columns are updated with new data from the data source. Only fixed virtualization can work with column virtualization at the same time. Fixed virtualization is not supported by some grid features: Resizing, Group By, Responsive. + * "continuous" renders a pre-defined number of rows in the grid. On scrolling the continuous virtualization loads another portion of rows and disposes the current one. + */ + virtualizationMode?: string; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + */ + rowVirtualization?: boolean; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * + */ + columnVirtualization?: boolean; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * + */ + virtualizationMouseWheelStep?: number; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + */ + adjustVirtualHeights?: boolean; + + /** + * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + * + * Valid values: + * "infragistics" The grid will use the Infragistics Templating engine to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. + * "jsRender" The grid will use jsRender to render its [column templates](ui.iggrid#options:columns.template) and specific parts of the UI. + */ + templatingEngine?: string; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + */ + columns?: IgGridColumn[]; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + * + * Valid values: + * "array" dataSource as an array + * "object" ddataSource as an object + * "string" dataSource as a string + */ + dataSource?: Array|Object|string; + + /** + * Specifies a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + */ + dataSourceUrl?: string; + + /** + * Explicitly set data source type (such as "json"). Please refer to the documentation of [$.ig.DataSource type](ig.datasource#options:settings.type). + * + */ + dataSourceType?: string; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + */ + responseDataKey?: string; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + */ + responseTotalRecCountKey?: string; + + /** + * Specifies the HTTP verb to be used to issue the requests to a remote data source. + * + */ + requestType?: string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + responseContentType?: string; + + /** + * Controls the visibility of the grid header. + * + */ + showHeader?: boolean; + + /** + * Controls the visibility of the grid footer. + * + */ + showFooter?: boolean; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + */ + fixedHeaders?: boolean; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + */ + fixedFooters?: boolean; + + /** + * Caption text that will be shown above the grid header. + * + */ + caption?: string; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + */ + features?: IgGridFeature[]; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + */ + tabIndex?: number; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * + */ + localSchemaTransform?: boolean; + + /** + * Key of the column containing unique identifiers for the data records. + * + */ + primaryKey?: string; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + */ + serializeTransactionLog?: boolean; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + */ + autoCommit?: 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * + */ + aggregateTransactions?: boolean; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * Valid values: + * "date" formats only Date columns + * "number" formats only number columns + * "dateandnumber" formats both Date and number columns + * "true" formats Date and number columns + * "false" auto formatting is disabled + */ + autoFormat?: string|boolean; + + /** + * Gets sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * + */ + renderCheckboxes?: boolean; + + /** + * URL to which updating requests will be made. + * + */ + updateUrl?: string; + + /** + * Settings related to REST compliant update routines. + * + */ + restSettings?: IgGridRestSettings; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + */ + alternateRowStyles?: boolean; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + */ + autofitLastColumn?: boolean; + + /** + * Enables/disables rendering of hover styles 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; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + */ + enableUTCDates?: boolean; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + */ + mergeUnboundColumns?: boolean; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + */ + jsonpRequest?: boolean; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + */ + enableResizeContainerCheck?: boolean; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + * + * Valid values: + * "none" Always hide the feature chooser icon; The feature chooser is shown on tapping/clicking the column header. + * "desktopOnly" Always show the icon on desktop but hide when touch device detected. + * "always" Always show it in any environment. Chooser is shown when tapping the gear icon or column header. + */ + featureChooserIconDisplay?: string; + + /** + * Settings related to content scrolling. + * + */ + scrollSettings?: IgGridScrollSettings; + /** * 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; + /** + * Event fired when a cell is clicked. + */ + cellClick?: CellClickEvent; + + /** + * Event fired when a cell is right clicked. + */ + cellRightClick?: CellRightClickEvent; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + */ + dataBinding?: DataBindingEvent; + + /** + * Event fired after data binding is complete. + */ + dataBound?: DataBoundEvent; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + */ + rendering?: RenderingEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + */ + rendered?: RenderedEvent; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + */ + dataRendering?: DataRenderingEvent; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + */ + dataRendered?: DataRenderedEvent; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + */ + headerRendering?: HeaderRenderingEvent; + + /** + * Event fired after the header has been rendered. + */ + headerRendered?: HeaderRenderedEvent; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + */ + captionRendering?: CaptionRenderingEvent; + + /** + * Event fired after the caption has been rendered. + */ + captionRendered?: CaptionRenderedEvent; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + */ + footerRendering?: FooterRenderingEvent; + + /** + * Event fired after the footer has been rendered. + */ + footerRendered?: FooterRenderedEvent; + + /** + * Event fired after every TH in the grid header has been rendered. + */ + headerCellRendered?: HeaderCellRenderedEvent; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + */ + rowsRendering?: RowsRenderingEvent; + + /** + * Event fired after data rows are rendered. + */ + rowsRendered?: RowsRenderedEvent; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + */ + schemaGenerated?: SchemaGeneratedEvent; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + */ + columnsCollectionModified?: ColumnsCollectionModifiedEvent; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + */ + requestError?: RequestErrorEvent; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + */ + created?: CreatedEvent; + + /** + * Fired when the grid is destroyed + */ + destroyed?: DestroyedEvent; + /** * Option for igTreeGrid */ @@ -73067,6 +83507,452 @@ interface IgTreeGridMethods { * Destroys igTreeGrid */ destroy(): Object; + + /** + * Returns the element holding the data records + */ + widget(): void; + + /** + * Returns whether grid has non-data fixed columns(e.g. row selectors column) + */ + hasFixedDataSkippedColumns(): boolean; + + /** + * Returns true if grid has at least one fixed columns(even if a non-data column - like row-selectors column) + */ + hasFixedColumns(): boolean; + + /** + * Returns the current fixing direction. NOTE - use only if ColumnFixing feature is enabled + * @return left|right + */ + fixingDirection(): string; + + /** + * Returns whether the column with identifier colKey is fixed + * + * @param colKey An identifier of the column which should be checked. It can be a key or visible index. + */ + isFixedColumn(colKey: Object): boolean; + + /** + * Called to detect whether grid container is resized. When autoAdjustHeight is true and height of the grid is changed then the height of grid is re-set. + */ + resizeContainer(): void; + + /** + * Returns whether the header identified by colKey is multicolumn header(has children) + * + * @param colKey value of the column key + */ + isGroupHeader(colKey: string): Object; + + /** + * Returns an object that contains information on the passed Dom element + * + * rowId - the id of the record associated with the element - if primaryKey is not set this will be null. + * rowIndex - the index (in the DOM) of the row associated with the element. + * recordIndex - index of the data record associated with this element in the current dataView. + * columnObject - the column object associated with this element ( if the element is tr this will be null) + * + * @param elem The Dom element or jQuery object which can be a TD or TR element from the grid. + */ + getElementInfo(elem: Element): Object; + + /** + * Returns the ID of the TABLE element where data records are rendered + */ + id(): string; + + /** + * Returns the DIV that is the topmost container of the grid widget + */ + container(): Element; + + /** + * Returns the table that contains the header cells + */ + headersTable(): Element; + + /** + * Returns the table that contains the footer cells + */ + footersTable(): Element; + + /** + * Returns the DIV that is used as a scroll container for the grid contents + */ + scrollContainer(): Element; + + /** + * Returns the DIV that is the topmost container of the fixed grid - contains fixed columns(in ColumnFixing scenario) + */ + fixedContainer(): Element; + + /** + * Returns the DIV that is the topmost container of the fixed body grid - contains fixed columns(in ColumnFixing scenario) + */ + fixedBodyContainer(): Element; + + /** + * Returns container(jQuery representation) containing fixed footer - contains fixed columns(in ColumnFixing scenario) + */ + fixedFooterContainer(): Object; + + /** + * Returns container(jQuery representation) containing fixed header - contains fixed columns(in ColumnFixing scenario) + */ + fixedHeaderContainer(): Object; + + /** + * Returns the table that contains the FIXED header cells - contains fixed columns(in ColumnFixing scenario) + */ + fixedHeadersTable(): Element; + + /** + * Returns the table that contains the footer cells - contains fixed columns(in ColumnFixing scenario) + */ + fixedFootersTable(): Element; + + /** + * Returns the cell TD element at the specified location + * + * @param x The column index. + * @param y The row index. + * @param isFixed Optional parameter - if true get cell TD at the specified location from the fixed table + */ + cellAt(x: number, y: number, isFixed: boolean): Element; + + /** + * Returns the cell TD element by row id and column key + * + * @param rowId The id of the row. + * @param columnKey The column key. + */ + cellById(rowId: Object, columnKey: string): Element; + + /** + * Returns the fixed table - contains fixed columns(in ColumnFixing scenario). If there aren't fixed columns returns the grid table + */ + fixedTable(): Object; + + /** + * Gets all immediate children of the current grid + */ + immediateChildrenWidgets(): any[]; + + /** + * Gets all children of the current grid, recursively + */ + childrenWidgets(): any[]; + + /** + * Gets all children's elements of the current grid, recursively + */ + children(): any[]; + + /** + * Gets all immediate children's elements of the current grid + */ + immediateChildren(): any[]; + + /** + * Returns the row (TR element) at the specified index. jQuery selectors aren't used for performance reasons + * + * @param i The row index. + */ + rowAt(i: number): Element; + + /** + * Returns the row TR element by row id + * + * @param rowId The id of the row. + * @param isFixed Specify search in the fixed container. + */ + rowById(rowId: Object, isFixed?: boolean): Element; + + /** + * Returns the fixed row (TR element) at the specified index. jQuery selectors aren't used for performance reasons(in ColumnFixing scenario - only when there is at least one fixed column) + * + * @param i The row index. + */ + fixedRowAt(i: number): Element; + + /** + * Returns a list of all fixed TR elements holding data in the grid(in ColumnFixing scenario - only when there is at least one fixed column) + */ + fixedRows(): any[]; + + /** + * Returns a list of all TR elements holding data in the grid(when there is at least one fixed column returns rows only in the UNFIXED table) + */ + rows(): any[]; + + /** + * Returns all data fixed rows recursively, not only the immediate ones(in ColumnFixing scenario - only when there is at least one fixed column) + */ + allFixedRows(): any[]; + + /** + * Returns all data rows recursively, not only the immediate ones(when there is at least one fixed column returns rows only in the UNFIXED table) + */ + allRows(): any[]; + + /** + * Returns a column object by the specified column key + * + * @param key The column key. + */ + columnByKey(key: string): Object; + + /** + * Returns a column object by the specified header text. If there are multiple matches, returns the first one. + * + * @param text The column header text. + */ + columnByText(text: string): Object; + + /** + * 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; + + /** + * Retrieves a cell value using the row index and the column key. If a primaryKey is defined, rowId is assumed to be the row Key (not index). + * If primary key is not defined, then rowId is converted to a number and is used as a row index. + * + * @param rowId Row index or row key (primary key). + * @param colKey The column key. + */ + getCellValue(rowId: Object, colKey: string): Object; + + /** + * Returns the cell text. If colKey is a number, the index of the column is used (instead of a column name)- does not apply when using a Multi-Row Layout grid. + * This is the actual text (or HTML string) for the contents of the cell. + * + * @param rowId Row index or row data key (primary key) + * @param colKey Column key. + */ + getCellText(rowId: Object, colKey: string): string; + + /** + * Sets a new template for a column after initialization and renders the grid if not explicitly disabled. This method will replace any existing explicitly set row template and will build one anew from the column ones. + * + * @param col An identifier of the column to set template for (index or key) + * @param tmpl The column template to set + * @param render Should the grid rerender after template is set + */ + setColumnTemplate(col: Object, tmpl: string, render?: boolean): void; + + /** + * Commits all pending transactions to the client data source. Note that there won't be anything to commit on the UI, since it is updated instantly. In order to rollback the actual UI, a call to dataBind() is required. + * + * @param rowId If specified, will commit only that transaction corresponding to the specified record key. + */ + commit(rowId?: Object): void; + + /** + * Returns a record by a specified key (requires that primaryKey is set in the settings). + * That is a wrapper for this.dataSource.findRecordByKey(key). + * + * @param key Primary key of the record + */ + findRecordByKey(key: Object): Object; + + /** + * Returns a standalone object (copy) that represents the committed transactions, but detached from the data source. + * That is a wrapper for this.dataSource.getDetachedRecord(t). + * + * @param t A transaction object. + */ + getDetachedRecord(t: Object): Object; + + /** + * Returns a list of all transaction objects that are pending to be committed or rolled back to the data source. + * That is a wrapper for this.dataSource.pendingTransactions(). + */ + pendingTransactions(): any[]; + + /** + * Returns a list of all transaction objects that are either pending, or have been committed in the data source. + * That is a wrapper for this.dataSource.allTransactions(). + */ + allTransactions(): any[]; + + /** + * Returns the accumulated transaction log as a string. The purpose of this is to be passed to URLs or used conveniently. + * That is a wrapper for this.dataSource.transactionsAsString(). + */ + transactionsAsString(): string; + + /** + * Invokes an AJAX request to the updateUrl option (if specified) and passes the serialized transaction log (a serialized JSON string) as part of the POST request. + * + * @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; + + /** + * Adds a new row (TR) to the grid, by taking a data row object. Assumes the record will have the primary key. + * + * @param rec Identifier/key of row. If missing, then number of rows in grid is used. + */ + renderNewRow(rec?: string): void; + + /** + * If the data source points to a local JSON array of data, and it is necessary to reset it at runtime, it must be done through this API member instead of the options (options.dataSource) + * + * @param dataSource New data source object. + */ + dataSourceObject(dataSource: Object): void; + + /** + * Returns the total number of records in the underlying backend. If paging or filtering is enabled, this may differ from the number of records in the client-side data source. + * In order for this to work, the response JSON/XML must include a property that specifies the total number of records, which name is specified by options.responseTotalRecCountKey. + * This functionality is completely delegated to the data source control. + */ + totalRecordsCount(): number; + + /** + * Moves a visible column at a specified place, in front or behind a target column or at a target index + * 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 of the column to be moved. It can be a key, a Multi-Column Header identificator, or an index in a number format. The latter is not supported when the grid contains multi-column headers. + * @param target An identifier of a column where the moved column should move to or an index at which the moved column should be moved to. In the case of a column identifier the column will be moved after it by default. + * @param after Specifies whether the column moved should be moved after or before the target column. This parameter is disregarded if there is no target column specified but a target index is used. + * @param inDom Specifies whether the column moving will be enacted through DOM manipulation or through rerendering of the grid. + * @param callback Specifies a custom function to be called when the column is moved. + */ + moveColumn(column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): 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. If a string is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when the column is shown(optional) + */ + showColumn(column: Object, 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 string is provided it will be used as a column key. + * @param callback Specifies a custom function to be called when the column is hidden(optional) + */ + hideColumn(column: Object, callback: Function): void; + + /** + * Gets unbound values for the specified column key. If key is not specified returns all unboundvalues + * + * @param key column key + */ + getUnboundValues(key: string): Object; + + /** + * Sets unbound values for the unbound column with the specified key. If removeOldValues is true then values(if any) for the unbound columns are re-set with the new values + * + * @param key key of the unbound column + * @param values array of values to be set on unbound values + * @param removeOldValues if true removes current unbound values(if any) for the specified column and apply the new ones specified in parameter values. Otherwise merge current values with the specified in parameter values + */ + setUnboundValues(key: string, values: any[], removeOldValues: Object): void; + + /** + * Sets unbound value for the unbound cell by the specified column key and row primary key. + * + * @param col key of the unbound column + * @param rowId primary key value of the row + * @param val value to be set on unbound cell + * @param notToRender if false will re-render the row + */ + setUnboundValueByPK(col: string, rowId: string, val: Object, notToRender: Object): void; + + /** + * Returns an unbound column with the specified key. If not found returns null + * + * @param key a column key + */ + getUnboundColumnByKey(key: string): Object; + + /** + * Returns whether there is vertical scrollbar. Because of perfrormance issues in older Internet Explorer especially 8,9 - there is no need to check if height is not set - there is no scrollbar OR if row virtualization is enabled - it is supposed there is vertical scrollbar + */ + hasVerticalScrollbar(): Object; + + /** + * Auto resize columns that have property width set to "*" so content to be auto-fitted(not shrinked/cutted). Auto-resizing is applied ONLY for visible columns + */ + autoSizeColumns(): void; + + /** + * Calculates the width of the column so its content to be auto-fitted to the width of the data in it(the content should NOT be shrinked/cutted) + * + * @param columnIndex Visible column index + */ + calculateAutoFitColumnWidth(columnIndex: number): number; + + /** + * Get visible index by specified column key. If column is not found or is hidden then returns -1. + * Note: Method does not count column groups (Multi-Column Headers). + * + * @param columnKey columnKey + * @param includeDataSkip Optional parameter - if set to true include non data columns(like expander column, row selectors column, etc.) in calculations + */ + getVisibleIndexByKey(columnKey: string, includeDataSkip: boolean): number; + + /** + * When called the method re-renders the whole grid(also rebinds to the data source) and renders the cols object + * + * @param cols an array of column objects + */ + renderMultiColumnHeader(cols: any[]): void; + + /** + * Scroll to the specified row or specified position(in pixels) + * + * @param scrollerPosition An identifier of the vertical scroll position. When it is string then it is interpreted as pixels otherwise it is the row number + */ + virtualScrollTo(scrollerPosition: Object): void; + + /** + * Returns column object and visible index for the table cell(TD) which is passed as argument + * + * @param $td cell(TD) - either DOM TD element or jQuery object + */ + getColumnByTD($td: Object): Object; } interface JQuery { data(propertyName: "igTreeGrid"): IgTreeGridMethods; @@ -73080,6 +83966,74 @@ interface JQuery { igTreeGrid(methodName: "collapseRow", row: Object, callback?: Function): void; igTreeGrid(methodName: "renderNewChild", rec: Object, parentId?: string): void; igTreeGrid(methodName: "destroy"): Object; + igTreeGrid(methodName: "widget"): void; + igTreeGrid(methodName: "hasFixedDataSkippedColumns"): boolean; + igTreeGrid(methodName: "hasFixedColumns"): boolean; + igTreeGrid(methodName: "fixingDirection"): string; + igTreeGrid(methodName: "isFixedColumn", colKey: Object): boolean; + igTreeGrid(methodName: "resizeContainer"): void; + igTreeGrid(methodName: "isGroupHeader", colKey: string): Object; + igTreeGrid(methodName: "getElementInfo", elem: Element): Object; + igTreeGrid(methodName: "id"): string; + igTreeGrid(methodName: "container"): Element; + igTreeGrid(methodName: "headersTable"): Element; + igTreeGrid(methodName: "footersTable"): Element; + igTreeGrid(methodName: "scrollContainer"): Element; + igTreeGrid(methodName: "fixedContainer"): Element; + igTreeGrid(methodName: "fixedBodyContainer"): Element; + igTreeGrid(methodName: "fixedFooterContainer"): Object; + igTreeGrid(methodName: "fixedHeaderContainer"): Object; + igTreeGrid(methodName: "fixedHeadersTable"): Element; + igTreeGrid(methodName: "fixedFootersTable"): Element; + igTreeGrid(methodName: "cellAt", x: number, y: number, isFixed: boolean): Element; + igTreeGrid(methodName: "cellById", rowId: Object, columnKey: string): Element; + igTreeGrid(methodName: "fixedTable"): Object; + igTreeGrid(methodName: "immediateChildrenWidgets"): any[]; + igTreeGrid(methodName: "childrenWidgets"): any[]; + igTreeGrid(methodName: "children"): any[]; + igTreeGrid(methodName: "immediateChildren"): any[]; + igTreeGrid(methodName: "rowAt", i: number): Element; + igTreeGrid(methodName: "rowById", rowId: Object, isFixed?: boolean): Element; + igTreeGrid(methodName: "fixedRowAt", i: number): Element; + igTreeGrid(methodName: "fixedRows"): any[]; + igTreeGrid(methodName: "rows"): any[]; + igTreeGrid(methodName: "allFixedRows"): any[]; + igTreeGrid(methodName: "allRows"): any[]; + igTreeGrid(methodName: "columnByKey", key: string): Object; + igTreeGrid(methodName: "columnByText", text: string): Object; + igTreeGrid(methodName: "selectedCells"): any[]; + igTreeGrid(methodName: "selectedRows"): any[]; + igTreeGrid(methodName: "selectedCell"): Object; + igTreeGrid(methodName: "selectedRow"): Object; + igTreeGrid(methodName: "activeCell"): Object; + igTreeGrid(methodName: "activeRow"): Object; + igTreeGrid(methodName: "getCellValue", rowId: Object, colKey: string): Object; + igTreeGrid(methodName: "getCellText", rowId: Object, colKey: string): string; + igTreeGrid(methodName: "setColumnTemplate", col: Object, tmpl: string, render?: boolean): void; + igTreeGrid(methodName: "commit", rowId?: Object): void; + igTreeGrid(methodName: "findRecordByKey", key: Object): Object; + igTreeGrid(methodName: "getDetachedRecord", t: Object): Object; + igTreeGrid(methodName: "pendingTransactions"): any[]; + igTreeGrid(methodName: "allTransactions"): any[]; + igTreeGrid(methodName: "transactionsAsString"): string; + igTreeGrid(methodName: "saveChanges", success: Function, error: Function): void; + igTreeGrid(methodName: "renderNewRow", rec?: string): void; + igTreeGrid(methodName: "dataSourceObject", dataSource: Object): void; + igTreeGrid(methodName: "totalRecordsCount"): number; + igTreeGrid(methodName: "moveColumn", column: Object, target: Object, after?: boolean, inDom?: boolean, callback?: Function): void; + igTreeGrid(methodName: "showColumn", column: Object, callback: Function): void; + igTreeGrid(methodName: "hideColumn", column: Object, callback: Function): void; + igTreeGrid(methodName: "getUnboundValues", key: string): Object; + igTreeGrid(methodName: "setUnboundValues", key: string, values: any[], removeOldValues: Object): void; + igTreeGrid(methodName: "setUnboundValueByPK", col: string, rowId: string, val: Object, notToRender: Object): void; + igTreeGrid(methodName: "getUnboundColumnByKey", key: string): Object; + igTreeGrid(methodName: "hasVerticalScrollbar"): Object; + igTreeGrid(methodName: "autoSizeColumns"): void; + igTreeGrid(methodName: "calculateAutoFitColumnWidth", columnIndex: number): number; + igTreeGrid(methodName: "getVisibleIndexByKey", columnKey: string, includeDataSkip: boolean): number; + igTreeGrid(methodName: "renderMultiColumnHeader", cols: any[]): void; + igTreeGrid(methodName: "virtualScrollTo", scrollerPosition: Object): void; + igTreeGrid(methodName: "getColumnByTD", $td: Object): 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. @@ -73277,21 +84231,685 @@ interface JQuery { */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceSettings", optionValue: IgTreeGridDataSourceSettings): void; + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "width"): string|number; + + /** + * Defines the grid width in pixels or percents. [Here you can find more info about setting igGrid width](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + */ + igTreeGrid(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. [Here you can find more info about setting igGrid height](http://www.igniteui.com/help/iggrid-columns-and-layout#width-height). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "height", optionValue: string|number): void; + + /** + * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoAdjustHeight"): boolean; + + /** + * If autoAdjustHeight is set to false, the [height](ui.iggrid#options:height) will be set only on the scrolling container, and all other UI elements such as paging footer / filter row / headers will add on top of that, so the total height of the grid will be more than this value - the height of the scroll container (content area) will not be dynamically calculated. Setting this option to false will usually result in a lot better initial rendering performance for large data sets ( > 1000 rows rendered at once, no [virtualization](ui.iggrid#options:virtualization) enabled), since no reflows will be made by browsers when accessing DOM properties such as offsetHeight. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoAdjustHeight", optionValue: boolean): void; + + /** + * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "avgRowHeight"): string|number; + + /** + * Used for [row virtualization](ui.iggrid#options:rowVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels (default) that will be used to calculate how many rows to render as the end user scrolls. Also all rows' height will be automatically set to this value. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "avgRowHeight", optionValue: string|number): void; + + /** + * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "avgColumnWidth"): string|number; + + /** + * Used for [column virtualization](ui.iggrid#options:columnVirtualization) in [fixed mode](ui.iggrid#options:virtualizationMode). This is the average value in pixels for a column width. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "avgColumnWidth", optionValue: string|number): void; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "defaultColumnWidth"): string|number; + + /** + * Default column width that will be set for all columns, that don't have [column width](ui.iggrid#options:columns.width) defined. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "defaultColumnWidth", optionValue: string|number): void; + + /** + * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoGenerateColumns"): boolean; + + /** + * If no [columns](ui.iggrid#options:columns) collection is defined, and autoGenerateColumns is set to true, [columns](ui.iggrid#options:columns) will be inferred from the data source before the [dataRendering](ui.iggrid#events:dataRendering) event is fired. The inferred [columns](ui.iggrid#options:columns) collection will be available to the developer for modification at [dataRendering](ui.iggrid#events:dataRendering). If autoGenerateColumns is not explicitly set and [columns](ui.iggrid#options:columns) has at least one column defined then autoGenerateColumns is automatically set to false. + * If autoGenerateColumns is true and there are columns defined auto-generated columns will render after the explicitly defined ones. + * Since auto-generated columns don't have width defined consider setting [defaultColumnWidth](ui.iggrid#options:defaultColumnWidth) as well. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoGenerateColumns", optionValue: boolean): void; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualization"): boolean; + + /** + * Enables/disables column and row virtualization at the same time. Virtualization can greatly enhance rendering performance. If enabled, the number of actual rendered rows (DOM elements) will be constant and related to the visible viewport of the grid. As the end user scrolls, those DOM elements will be dynamically reused to render the new data. [Here you can find more info about the performance guidelines when using the igGrid](http://www.igniteui.com/help/iggrid-performance-guide) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualization", optionValue: boolean): void; + + /** + * Determines row virtualization mode. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMode"): string; + + /** + * Determines row virtualization mode. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMode", optionValue: string): void; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowVirtualization"): boolean; + + /** + * Enables virtualization for rows only. [Here you can find more info about igGrid row virtualization](http://www.igniteui.com/help/iggrid-virtualization-overview) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowVirtualization", optionValue: boolean): void; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "columnVirtualization"): boolean; + + /** + * Enables virtualization for columns only. Column virtualization can work only in combination with fixed row virtalization. Setting columnVirtualization to true will automatically set [virtualization](ui.iggrid#options:virtualization) to true and [virtualizationMode](ui.iggrid#options:virtualizationMode) to "fixed". + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "columnVirtualization", optionValue: boolean): void; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep"): number; + + /** + * Number of pixels to scroll the grid by, when virtualization is enabled, and mouse wheel scrolling is performed over the virtual grid area. If "null" the step will be equal to the [avgRowHeight](ui.iggrid#options:avgRowHeight). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "virtualizationMouseWheelStep", optionValue: number): void; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights"): boolean; + + /** + * If this option is set to true, the height of the grid row will be calculated automatically based on the [avgRowHeight](ui.iggrid#options:avgRowHeight) and the visible virtual records. If no [avgRowHeight](ui.iggrid#options:avgRowHeight) is specified, it will be calculated automatically at runtime. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "adjustVirtualHeights", optionValue: boolean): void; + + /** + * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "templatingEngine"): string; + + /** + * The templating engine that will be used to render the grid [column templates](ui.iggrid#options:columns.template). [Here you can find](http://www.infragistics.com/community/blogs/marina_stoyanova/archive/2014/05/30/using-different-template-engines-with-ignite-ui-controls.aspx) how to use templating engines other than igTemplating and jsRender. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "templatingEngine", optionValue: string): void; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "columns"): IgGridColumn[]; + + /** + * An array of column objects. Checkout the [Columns and Layout](http://www.igniteui.com/help/iggrid-columns-and-layout#defining-columns) topic for details on configuring the columns array. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "columns", optionValue: IgGridColumn[]): void; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSource"): Array|Object|string; + + /** + * Can be any valid data source accepted by [$.ig.DataSource](ig.datasource), or an instance of an $.ig.DataSource itself + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSource", optionValue: Array|Object|string): void; + + /** + * Gets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSourceUrl"): string; + + /** + * Sets a remote URL as a data source, from which data will be retrieved using the [$.ig.DataSource](ig.datasource). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSourceUrl", 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). + * + */ + igTreeGrid(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). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataSourceType", optionValue: string): void; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "responseDataKey"): string; + + /** + * See [$.ig.DataSource responseDataKey](ig.datasource#options:settings.responseDataKey). This is the property in the responses where data records are held, if the response is wrapped. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "responseDataKey", optionValue: string): void; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey"): string; + + /** + * See [$.ig.DataSource responseTotalRecCountKey](ig.datasource#options:settings.responseTotalRecCountKey). Property in the response specifying the total number of records on the server. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "responseTotalRecCountKey", optionValue: string): void; + + /** + * Gets the HTTP verb to be used to issue the requests to a remote data source. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "requestType"): string; + + /** + * Sets the HTTP verb to be used to issue the requests to a remote data source. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "requestType", optionValue: string): void; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "responseContentType"): string; + + /** + * Content type of the response. See http://api.jquery.com/jQuery.ajax/ => contentType + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "responseContentType", optionValue: string): void; + + /** + * Controls the visibility of the grid header. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "showHeader"): boolean; + + /** + * Controls the visibility of the grid header. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "showHeader", optionValue: boolean): void; + + /** + * Controls the visibility of the grid footer. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "showFooter"): boolean; + + /** + * Controls the visibility of the grid footer. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "showFooter", optionValue: boolean): void; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "fixedHeaders"): boolean; + + /** + * Headers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedHeaders will always act as if it's true, no matter which value is set. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "fixedHeaders", optionValue: boolean): void; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "fixedFooters"): boolean; + + /** + * Footers will be fixed if this option is set to true, and only the grid data will be scrollable. If [virtualization](ui.iggrid#options:virtualization) is enabled, fixedFooters will always act as if it's true, no matter which value is set. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "fixedFooters", optionValue: boolean): void; + + /** + * Caption text that will be shown above the grid header. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "caption"): string; + + /** + * Caption text that will be shown above the grid header. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "caption", optionValue: string): void; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "features"): IgGridFeature[]; + + /** + * List of grid feature definitions: sorting, paging, etc. Each feature goes with its separate options that are documented for the feature accordingly. [Here you can find detailed documentation for all igGrid features](http://www.igniteui.com/help/iggrid-features-landing-page) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "features", optionValue: IgGridFeature[]): void; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "tabIndex"): number; + + /** + * Initial tabIndex attribute that will be set on all focusable elements. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "tabIndex", optionValue: number): void; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "localSchemaTransform"): boolean; + + /** + * If this option is set to false, the data to which the grid is bound will be used "as is" with no additional transformations based on [columns](ui.iggrid#options:columns) defined. Otherwise only the subset of data properties used in the [columns](ui.iggrid#options:columns) defined will be extracted in a new object and used. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "localSchemaTransform", optionValue: boolean): void; + + /** + * Key of the column containing unique identifiers for the data records. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "primaryKey"): string; + + /** + * Key of the column containing unique identifiers for the data records. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "primaryKey", optionValue: string): void; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "serializeTransactionLog"): boolean; + + /** + * If true, the transaction log will always be sent in the request for remote data, by the data source. Also this means that if there are values in the log, a POST will be performed instead of GET. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "serializeTransactionLog", optionValue: boolean): void; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoCommit"): boolean; + + /** + * Automatically commits the transactions as rows/cells are being edited to the client data source. A [saveChanges](ui.iggrid#methods:saveChanges) call still needs to be performed in order to commit the transactions to a server-side data source. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoCommit", optionValue: boolean): void; + + /** + * 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "aggregateTransactions"): 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 a new row is added, edited, then deleted, there will be no transaction added to the log. + * If several edits are made to a row or an individual cell, this should result in a single transaction. + * Note: This option takes effect only when [autoCommit](ui.iggrid#options:autoCommit) is set to false. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "aggregateTransactions", optionValue: boolean): void; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoFormat"): string|boolean; + + /** + * Sets gets ability to automatically format text in cells for numeric and date columns. The format patterns and rules for numbers and dates are defined in $.ig.regional.defaults object. [Here column formatting is explained in details](http://www.igniteui.com/help/iggrid-columns-and-layout#column-formatting) + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "autoFormat", optionValue: string|boolean): void; + + /** + * Gets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderCheckboxes"): boolean; + + /** + * Sets ability to render checkboxes and use checkbox editor when dataType of a column is "bool". Checkboxes are not rendered for boolean values in columns with a [column template](ui.iggrid#options:columns.template). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "renderCheckboxes", optionValue: boolean): void; + + /** + * URL to which updating requests will be made. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "updateUrl"): string; + + /** + * URL to which updating requests will be made. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "updateUrl", optionValue: string): void; + + /** + * Settings related to REST compliant update routines. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "restSettings"): IgGridRestSettings; + + /** + * Settings related to REST compliant update routines. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: IgGridRestSettings): void; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "alternateRowStyles"): boolean; + + /** + * Enables/disables rendering of alternating row styles (odd and even rows receive different styling). + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "alternateRowStyles", optionValue: boolean): void; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "autofitLastColumn"): boolean; + + /** + * If set to true and all columns' widths are specified and their combined width is less than the grid width then the last column width will be automatically adjusted to fill the remaining empty space of the grid. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "autofitLastColumn", optionValue: boolean): void; + + /** + * Enables/disables rendering of hover styles 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. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableHoverStyles"): boolean; + + /** + * Enables/disables rendering of hover styles 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. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableHoverStyles", optionValue: boolean): void; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableUTCDates"): boolean; + + /** + * Enables/Disables serializing client date as UTC ISO 8061 string instead of using the local time and zone values. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableUTCDates", optionValue: boolean): void; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns"): boolean; + + /** + * Merge unbound columns values inside data source when data source is remote. If true then the unbound columns are merged to the data source at runtime on the server. Note that data source is expanded with the new data and this could cause performance issues when the data is huge. If mergeUnboundColumns is false then the unbound data is sent and merged on the client. This option is used by the [igGrid MVC Helper](http://www.igniteui.com/help/iggrid-developing-asp-net-mvc-applications-with-iggrid). + * Checkout [Populating Unbound Columns Remotely (igGrid)](http://www.igniteui.com/help/iggrid-unboundcolumns-populating-with-data-remotely) topic for more information. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "mergeUnboundColumns", optionValue: boolean): void; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "jsonpRequest"): boolean; + + /** + * When dataSource is a remote URL, defines whether to set the type of the remote data source to JSONP. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "jsonpRequest", optionValue: boolean): void; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck"): boolean; + + /** + * Enables/disables grid adjusting its dimensions when its [width](ui.iggrid#options:width) and/or [height](ui.iggrid#options:height) is set in percent (%) and grid parent DOM container is resized. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "enableResizeContainerCheck", optionValue: boolean): void; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay"): string; + + /** + * Configures how the feature chooser icon should display on header cells - e.g. to display as gear icon or not. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "featureChooserIconDisplay", optionValue: string): void; + + /** + * Settings related to content scrolling. + * + */ + igTreeGrid(optionLiteral: 'option', optionName: "scrollSettings"): IgGridScrollSettings; + + /** + * Settings related to content scrolling. + * + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "scrollSettings", optionValue: IgGridScrollSettings): 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. */ @@ -73299,21 +84917,11 @@ interface JQuery { /** * 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. */ @@ -73321,19 +84929,11 @@ interface JQuery { /** * 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. */ @@ -73341,25 +84941,315 @@ interface JQuery { /** * 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; + + /** + * Event fired when a cell is clicked. + */ + igTreeGrid(optionLiteral: 'option', optionName: "cellClick"): CellClickEvent; + + /** + * Event fired when a cell is clicked. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "cellClick", optionValue: CellClickEvent): void; + + /** + * Event fired when a cell is right clicked. + */ + igTreeGrid(optionLiteral: 'option', optionName: "cellRightClick"): CellRightClickEvent; + + /** + * Event fired when a cell is right clicked. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "cellRightClick", optionValue: CellRightClickEvent): void; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataBinding"): DataBindingEvent; + + /** + * Event fired before data binding takes place. + * + * Return false in order to cancel data binding. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataBinding", optionValue: DataBindingEvent): void; + + /** + * Event fired after data binding is complete. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataBound"): DataBoundEvent; + + /** + * Event fired after data binding is complete. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataBound", optionValue: DataBoundEvent): void; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rendering"): RenderingEvent; + + /** + * Event fired before the grid starts rendering (all contents). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * Return false in order to cancel grid rendering. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rendering", optionValue: RenderingEvent): void; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + */ + igTreeGrid(optionLiteral: 'option', optionName: "rendered"): RenderedEvent; + + /** + * Event fired after the whole grid widget has been rendered (including headers, footers, etc.). + * This event is fired only when the grid is being initialized. + * It will not be fired if the grid is rebound to its data + * (for example, when calling the dataBind() API method + * or when changing the page size (when paging is enabled)). + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rendered", optionValue: RenderedEvent): void; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataRendering"): DataRenderingEvent; + + /** + * Event fired before the TBODY holding the data records starts its rendering. + * Return false in order to cancel data records rendering. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataRendering", optionValue: DataRenderingEvent): void; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataRendered"): DataRenderedEvent; + + /** + * Event fired after all of the data records in the grid table body have been rendered. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "dataRendered", optionValue: DataRenderedEvent): void; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + */ + igTreeGrid(optionLiteral: 'option', optionName: "headerRendering"): HeaderRenderingEvent; + + /** + * Event fired before the header starts its rendering. + * Return false in order to cancel header rendering. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "headerRendering", optionValue: HeaderRenderingEvent): void; + + /** + * Event fired after the header has been rendered. + */ + igTreeGrid(optionLiteral: 'option', optionName: "headerRendered"): HeaderRenderedEvent; + + /** + * Event fired after the header has been rendered. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "headerRendered", optionValue: HeaderRenderedEvent): void; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + */ + igTreeGrid(optionLiteral: 'option', optionName: "captionRendering"): CaptionRenderingEvent; + + /** + * Event fired before the caption starts its rendering. + * Return false in order to cancel caption rendering. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "captionRendering", optionValue: CaptionRenderingEvent): void; + + /** + * Event fired after the caption has been rendered. + */ + igTreeGrid(optionLiteral: 'option', optionName: "captionRendered"): CaptionRenderedEvent; + + /** + * Event fired after the caption has been rendered. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "captionRendered", optionValue: CaptionRenderedEvent): void; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + */ + igTreeGrid(optionLiteral: 'option', optionName: "footerRendering"): FooterRenderingEvent; + + /** + * Event fired before the footer starts its rendering. + * + * Return false in order to cancel footer rendering. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "footerRendering", optionValue: FooterRenderingEvent): void; + + /** + * Event fired after the footer has been rendered. + */ + igTreeGrid(optionLiteral: 'option', optionName: "footerRendered"): FooterRenderedEvent; + + /** + * Event fired after the footer has been rendered. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "footerRendered", optionValue: FooterRenderedEvent): void; + + /** + * Event fired after every TH in the grid header has been rendered. + */ + igTreeGrid(optionLiteral: 'option', optionName: "headerCellRendered"): HeaderCellRenderedEvent; + + /** + * Event fired after every TH in the grid header has been rendered. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "headerCellRendered", optionValue: HeaderCellRenderedEvent): void; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowsRendering"): RowsRenderingEvent; + + /** + * Event fired before actual data rows (TRs) are rendered. + * Return false in order to cancel rows rendering. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowsRendering", optionValue: RowsRenderingEvent): void; + + /** + * Event fired after data rows are rendered. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowsRendered"): RowsRenderedEvent; + + /** + * Event fired after data rows are rendered. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "rowsRendered", optionValue: RowsRenderedEvent): void; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + */ + igTreeGrid(optionLiteral: 'option', optionName: "schemaGenerated"): SchemaGeneratedEvent; + + /** + * Event fired after $.ig.DataSource schema has been generated, in case it needs to be modified. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "schemaGenerated", optionValue: SchemaGeneratedEvent): void; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + */ + igTreeGrid(optionLiteral: 'option', optionName: "columnsCollectionModified"): ColumnsCollectionModifiedEvent; + + /** + * Event fired after the columns colection has been modified(e.g. a column is hidden) + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "columnsCollectionModified", optionValue: ColumnsCollectionModifiedEvent): void; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + */ + igTreeGrid(optionLiteral: 'option', optionName: "requestError"): RequestErrorEvent; + + /** + * Event fired if there is an error in the request, when the grid is doing a remote operation, + * such as data binding, paging, sorting, etc. + * + * @optionValue Define event handler function. + */ + igTreeGrid(optionLiteral: 'option', optionName: "requestError", optionValue: RequestErrorEvent): void; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + */ + igTreeGrid(optionLiteral: 'option', optionName: "created"): CreatedEvent; + + /** + * Fired when the grid is created and the initial structure is rendered (this doesn't necessarily imply the data will be there if the data source is remote) + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "created", optionValue: CreatedEvent): void; + + /** + * Fired when the grid is destroyed + */ + igTreeGrid(optionLiteral: 'option', optionName: "destroyed"): DestroyedEvent; + + /** + * Fired when the grid is destroyed + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "destroyed", optionValue: DestroyedEvent): void; igTreeGrid(options: IgTreeGrid): JQuery; igTreeGrid(optionLiteral: 'option', optionName: string): any; igTreeGrid(optionLiteral: 'option', options: IgTreeGrid): JQuery; @@ -73374,41 +85264,21 @@ interface IgTreeGridMultiColumnHeaders { /** * 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; @@ -73477,21 +85347,11 @@ interface JQuery { /** * 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. */ @@ -73499,21 +85359,11 @@ interface JQuery { /** * 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. */ @@ -73521,21 +85371,11 @@ interface JQuery { /** * 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. */ @@ -73543,21 +85383,11 @@ interface JQuery { /** * 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. */ @@ -73573,25 +85403,6 @@ interface ContextRowRenderingEvent { } 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 { @@ -73599,30 +85410,6 @@ interface ContextRowRenderedEvent { } 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 { @@ -73898,81 +85685,45 @@ interface IgTreeGridPaging { /** * 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. + * Event fired after the page size is changed from the page size dropdown. */ 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; @@ -74613,22 +86364,12 @@ interface JQuery { /** * 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. */ @@ -74636,23 +86377,11 @@ interface JQuery { /** * 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. */ @@ -74661,22 +86390,12 @@ interface JQuery { /** * 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. */ @@ -74684,19 +86403,11 @@ interface JQuery { /** * 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. */ @@ -74705,10 +86416,6 @@ interface JQuery { /** * 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; @@ -74716,10 +86423,6 @@ interface JQuery { /** * 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. @@ -74728,19 +86431,11 @@ interface JQuery { /** * 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. */ @@ -74748,21 +86443,13 @@ interface JQuery { /** * 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. + * Event fired after the page size is changed from the page size dropdown. */ 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. + * Event fired after the page size is changed from the page size dropdown. * * @optionValue Define event handler function. */ @@ -74770,19 +86457,11 @@ interface JQuery { /** * 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. */ @@ -74825,35 +86504,16 @@ interface IgTreeGridResizing { /** * 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; @@ -74951,23 +86611,11 @@ interface JQuery { /** * 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. */ @@ -74975,23 +86623,11 @@ interface JQuery { /** * 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. */ @@ -74999,25 +86635,11 @@ interface JQuery { /** * 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. */ @@ -75068,6 +86690,7 @@ interface IgTreeGridRowSelectors { rowNumberingSeed?: number; /** + * defines width of the row selector`s column in pixels or percentage. * * * Valid values: @@ -75124,43 +86747,16 @@ interface IgTreeGridRowSelectors { /** * 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; @@ -75310,12 +86906,14 @@ interface JQuery { igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowNumberingSeed", optionValue: number): void; /** - * * + * Defines width of the row selector`s column in pixels or percentage. + * */ igTreeGridRowSelectors(optionLiteral: 'option', optionName: "rowSelectorColumnWidth"): string|number; /** - * * + * Defines width of the row selector`s column in pixels or percentage. + * * * @optionValue New value to be set. */ @@ -75425,27 +87023,11 @@ interface JQuery { /** * 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. */ @@ -75453,31 +87035,11 @@ interface JQuery { /** * 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. */ @@ -75485,29 +87047,11 @@ interface JQuery { /** * 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. */ @@ -75586,122 +87130,44 @@ interface IgTreeGridSelection { /** * 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; @@ -75783,28 +87249,28 @@ interface IgTreeGridSelectionMethods { /** * 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. + * 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. + * 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. + * 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. + * If multiple selection is enabled the function will return null. */ selectedRow(): Object; @@ -75983,32 +87449,12 @@ interface JQuery { /** * 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. */ @@ -76016,27 +87462,11 @@ interface JQuery { /** * 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. */ @@ -76045,42 +87475,12 @@ interface JQuery { /** * 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. */ @@ -76088,33 +87488,11 @@ interface JQuery { /** * 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. */ @@ -76123,32 +87501,12 @@ interface JQuery { /** * 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. */ @@ -76156,31 +87514,11 @@ interface JQuery { /** * 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. */ @@ -76189,26 +87527,12 @@ interface JQuery { /** * 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. */ @@ -76216,25 +87540,11 @@ interface JQuery { /** * 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. */ @@ -76468,138 +87778,71 @@ interface IgTreeGridSorting { /** * 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; @@ -77149,24 +88392,12 @@ interface JQuery { /** * 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. */ @@ -77174,23 +88405,11 @@ interface JQuery { /** * 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. */ @@ -77198,19 +88417,11 @@ interface JQuery { /** * 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. */ @@ -77218,19 +88429,11 @@ interface JQuery { /** * 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. */ @@ -77238,23 +88441,11 @@ interface JQuery { /** * 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. */ @@ -77262,19 +88453,11 @@ interface JQuery { /** * 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. */ @@ -77282,19 +88465,11 @@ interface JQuery { /** * 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. */ @@ -77302,19 +88477,11 @@ interface JQuery { /** * 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. */ @@ -77322,19 +88489,11 @@ interface JQuery { /** * 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. */ @@ -77342,23 +88501,11 @@ interface JQuery { /** * 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. */ @@ -77366,21 +88513,11 @@ interface JQuery { /** * 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. */ @@ -77388,21 +88525,11 @@ interface JQuery { /** * 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. */ @@ -77410,21 +88537,11 @@ interface JQuery { /** * 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. */ @@ -77432,19 +88549,11 @@ interface JQuery { /** * 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. */ @@ -77522,49 +88631,21 @@ interface IgTreeGridTooltips { /** * 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; @@ -77719,25 +88800,11 @@ interface JQuery { /** * 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. */ @@ -77745,25 +88812,11 @@ interface JQuery { /** * 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. */ @@ -77771,25 +88824,11 @@ interface JQuery { /** * 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. */ @@ -77797,25 +88836,11 @@ interface JQuery { /** * 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. */ @@ -77942,7 +88967,7 @@ interface IgTreeGridUpdating { 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. + * Specifies how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma 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; @@ -78003,215 +89028,102 @@ interface IgTreeGridUpdating { /** * 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; @@ -78621,13 +89533,13 @@ interface JQuery { 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. + * Gets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma 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. + * Sets how end-users are able to start edit mode. Possible values: "click", "dblclick", "F2", "enter" and their combinations separated by coma 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. @@ -78761,22 +89673,12 @@ interface JQuery { /** * 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. */ @@ -78784,21 +89686,11 @@ interface JQuery { /** * 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. */ @@ -78807,28 +89699,12 @@ interface JQuery { /** * 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. */ @@ -78836,27 +89712,11 @@ interface JQuery { /** * 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. */ @@ -78865,30 +89725,12 @@ interface JQuery { /** * 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. */ @@ -78896,29 +89738,11 @@ interface JQuery { /** * 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. */ @@ -78927,34 +89751,12 @@ interface JQuery { /** * 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. */ @@ -78962,33 +89764,11 @@ interface JQuery { /** * 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. */ @@ -78997,22 +89777,12 @@ interface JQuery { /** * 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. */ @@ -79020,21 +89790,11 @@ interface JQuery { /** * 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. */ @@ -79043,22 +89803,12 @@ interface JQuery { /** * 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. */ @@ -79066,21 +89816,11 @@ interface JQuery { /** * 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. */ @@ -79089,18 +89829,12 @@ interface JQuery { /** * 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. */ @@ -79108,19 +89842,11 @@ interface JQuery { /** * 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. */ @@ -79128,19 +89854,11 @@ interface JQuery { /** * 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. */ @@ -79148,19 +89866,11 @@ interface JQuery { /** * 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. */ @@ -79168,19 +89878,11 @@ interface JQuery { /** * 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. */ @@ -79188,19 +89890,11 @@ interface JQuery { /** * 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. */ @@ -79208,19 +89902,11 @@ interface JQuery { /** * 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. */ @@ -79285,10 +89971,6 @@ interface FileSelectingEvent { } interface FileSelectingEventUIParam { - /** - * Used to access the igUpload widget object. - */ - owner?: any; } interface FileSelectedEvent { @@ -79296,20 +89978,6 @@ interface FileSelectedEvent { } 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 { @@ -79317,40 +89985,6 @@ interface FileUploadingEvent { } 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 { @@ -79358,30 +89992,6 @@ interface FileUploadedEvent { } 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 { @@ -79389,35 +89999,6 @@ interface FileUploadAbortedEvent { } 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 { @@ -79425,10 +90006,6 @@ interface CancelAllClickedEvent { } interface CancelAllClickedEventUIParam { - /** - * Used to access the igUpload widget object. - */ - owner?: any; } interface OnErrorEvent { @@ -79436,35 +90013,6 @@ interface OnErrorEvent { } 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 { @@ -79472,20 +90020,6 @@ interface FileExtensionsValidatingEvent { } 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 { @@ -79493,25 +90027,6 @@ interface OnXHRLoadEvent { } 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 { @@ -79519,30 +90034,6 @@ interface OnFormDataSubmitEvent { } 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 { @@ -79787,104 +90278,53 @@ interface IgUpload { /** * 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; @@ -80576,16 +91016,12 @@ interface JQuery { /** * 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. */ @@ -80594,20 +91030,12 @@ interface JQuery { /** * 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. */ @@ -80616,28 +91044,12 @@ interface JQuery { /** * 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. */ @@ -80645,23 +91057,11 @@ interface JQuery { /** * 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. */ @@ -80669,25 +91069,11 @@ interface JQuery { /** * 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. */ @@ -80695,15 +91081,11 @@ interface JQuery { /** * 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. */ @@ -80711,25 +91093,11 @@ interface JQuery { /** * 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. */ @@ -80737,19 +91105,11 @@ interface JQuery { /** * 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. */ @@ -80757,21 +91117,11 @@ interface JQuery { /** * 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. */ @@ -80779,23 +91129,11 @@ interface JQuery { /** * 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. */ @@ -81594,368 +91932,368 @@ interface JQuery { } declare namespace Infragistics { - class IgValidatorBaseRule { - constructor(name: string); - constructor(formatItems: any[]); +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 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; + /** + * 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; + /** + * 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; - } + /** + * 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; +IgValidatorBaseRule: typeof Infragistics.IgValidatorBaseRule; } declare namespace Infragistics { - class IgValidatorRequiredRule { - constructor(name: string); - constructor(groupTypes: any[]); - constructor(groupMessageName: string); - constructor(formatItems: any[]); - getMessageType(options: Object): void; - isValid(options: Object, value: Object): void; +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; + /** + * 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; - } + /** + * 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; +IgValidatorRequiredRule: typeof Infragistics.IgValidatorRequiredRule; } declare namespace Infragistics { - class IgValidatorControlRule { - constructor(name: string); - constructor(formatItems: any[]); - getMessageType(): void; +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; + /** + * 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; - } + /** + * 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; +IgValidatorControlRule: typeof Infragistics.IgValidatorControlRule; } declare namespace Infragistics { - class IgValidatorNumberRule { - constructor(name: string); - constructor(formatItems: any[]); - isValid(options: Object, value: Object): void; +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 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; + /** + * 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; - } + /** + * 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; +IgValidatorNumberRule: typeof Infragistics.IgValidatorNumberRule; } declare namespace Infragistics { - class IgValidatorDateRule { - constructor(name: string); - constructor(formatItems: any[]); - isValid(options: Object, value: Object): void; +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 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; + /** + * 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; - } + /** + * 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; +IgValidatorDateRule: typeof Infragistics.IgValidatorDateRule; } declare namespace Infragistics { - class IgValidatorLengthRule { - constructor(name: string); - constructor(formatItems: any[]); - getMessageType(): void; - isValid(options: Object, value: Object): void; +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; + /** + * 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; - } + /** + * 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; +IgValidatorLengthRule: typeof Infragistics.IgValidatorLengthRule; } declare namespace Infragistics { - class IgValidatorValueRule { - constructor(name: string); - constructor(formatItems: any[]); - getMessageType(): void; - isValid(options: Object, value: Object): void; - } +class IgValidatorValueRule { + constructor(name: string); + constructor(formatItems: any[]); + getMessageType(): void; + isValid(options: Object, value: Object): void; +} } interface IgniteUIStatic { - IgValidatorValueRule: typeof Infragistics.IgValidatorValueRule; +IgValidatorValueRule: typeof Infragistics.IgValidatorValueRule; } declare namespace Infragistics { - class IgValidatorEqualToRule { - constructor(name: string); - constructor(formatItems: any[]); - isValid(options: Object, value: Object): void; +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 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; + /** + * 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; - } + /** + * 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; +IgValidatorEqualToRule: typeof Infragistics.IgValidatorEqualToRule; } declare namespace Infragistics { - class IgValidatorEmailRule { - constructor(name: string); - constructor(formatItems: any[]); - isValid(options: Object, value: Object): void; +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 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; + /** + * 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; - } + /** + * 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; +IgValidatorEmailRule: typeof Infragistics.IgValidatorEmailRule; } declare namespace Infragistics { - class IgValidatorPatternRule { - constructor(name: string); - constructor(formatItems: any[]); - isValid(options: Object, value: Object): void; +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 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; + /** + * 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; - } + /** + * 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; +IgValidatorPatternRule: typeof Infragistics.IgValidatorPatternRule; } declare namespace Infragistics { - class IgValidatorCustomRule { - constructor(name: string); - constructor(formatItems: any[]); - getMessageType(): void; - isValid(options: Object, value: Object): void; +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; + /** + * 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; - } + /** + * 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; +IgValidatorCustomRule: typeof Infragistics.IgValidatorCustomRule; } declare namespace Infragistics { - class IgValidatorCreditCardRule { - constructor(name: string); - constructor(formatItems: any[]); +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; + /** + * 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 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; + /** + * 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; - } + /** + * 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; +IgValidatorCreditCardRule: typeof Infragistics.IgValidatorCreditCardRule; } interface JQuery { @@ -83221,7 +93559,7 @@ interface IgVideoPlayer { 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. + * 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. When this option is set to true, no [commercials](ui.igvideoplayer#options:commercials) will be displayed as they are not supported. * */ browserControls?: boolean; @@ -83281,7 +93619,7 @@ interface IgVideoPlayer { banners?: IgVideoPlayerBanner[]; /** - * Gets/Sets an array of commercials objects that will be displayed when the video is playing. + * Gets/Sets an array of commercials objects that will be displayed when the video is playing. Note that [broswerControls](ui.igvideoplayer#options:browserControls) doesn't support commercials. * */ commercials?: IgVideoPlayerCommercials; @@ -83702,13 +94040,13 @@ interface JQuery { 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. + * 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. When this option is set to true, no [commercials](ui.igvideoplayer#options:commercials) will be displayed as they are not supported. * */ 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. + * /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. When this option is set to true, no [commercials](ui.igvideoplayer#options:commercials) will be displayed as they are not supported. * * * @optionValue New value to be set. @@ -83842,13 +94180,13 @@ interface JQuery { igVideoPlayer(optionLiteral: 'option', optionName: "banners", optionValue: IgVideoPlayerBanner[]): void; /** - * Gets/Sets an array of commercials objects that will be displayed when the video is playing. + * Gets/Sets an array of commercials objects that will be displayed when the video is playing. Note that [broswerControls](ui.igvideoplayer#options:browserControls) doesn't support commercials. * */ igVideoPlayer(optionLiteral: 'option', optionName: "commercials"): IgVideoPlayerCommercials; /** - * /Sets an array of commercials objects that will be displayed when the video is playing. + * /Sets an array of commercials objects that will be displayed when the video is playing. Note that [broswerControls](ui.igvideoplayer#options:browserControls) doesn't support commercials. * * * @optionValue New value to be set. @@ -84180,10 +94518,6 @@ interface ZoomChangingEvent { } interface ZoomChangingEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface ZoomChangedEvent { @@ -84191,10 +94525,6 @@ interface ZoomChangedEvent { } interface ZoomChangedEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface ProviderCreatedEvent { @@ -84202,15 +94532,6 @@ interface ProviderCreatedEvent { } interface ProviderCreatedEventUIParam { - /** - * Used to get the reference the created provider - */ - provider?: any; - - /** - * Used to get reference to igZoombar - */ - owner?: any; } interface WindowDragStartingEvent { @@ -84218,10 +94539,6 @@ interface WindowDragStartingEvent { } interface WindowDragStartingEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface WindowDragStartedEvent { @@ -84229,10 +94546,6 @@ interface WindowDragStartedEvent { } interface WindowDragStartedEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface WindowDraggingEvent { @@ -84240,10 +94553,6 @@ interface WindowDraggingEvent { } interface WindowDraggingEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface WindowDragEndingEvent { @@ -84251,10 +94560,6 @@ interface WindowDragEndingEvent { } interface WindowDragEndingEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface WindowDragEndedEvent { @@ -84262,10 +94567,6 @@ interface WindowDragEndedEvent { } interface WindowDragEndedEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface WindowResizingEvent { @@ -84273,10 +94574,6 @@ interface WindowResizingEvent { } interface WindowResizingEventUIParam { - /** - * Used to get reference to igZoombar. - */ - owner?: any; } interface IgZoombar { @@ -84371,95 +94668,52 @@ interface IgZoombar { /** * 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; @@ -84533,98 +94787,98 @@ interface ZoombarProviderDefaultSettings { } declare namespace Infragistics { - class ZoombarProviderDefault { - constructor(settings: ZoombarProviderDefaultSettings); +class ZoombarProviderDefault { + constructor(settings: ZoombarProviderDefaultSettings); - /** - * Will be called before the provider instance is deleted (to unbind jQuery events, etc.) - */ - clean(): void; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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 provider"s widget name + */ + widgetName(): void; - /** - * Returns the target widget width property - */ - targetWidth(): 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 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; + /** + * 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; + /** + * 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; - } + /** + * Jshint ignore:line + * + * @param a + * @param b + */ + update(a: Object, b: Object): void; +} } interface IgniteUIStatic { - ZoombarProviderDefault: typeof Infragistics.ZoombarProviderDefault; +ZoombarProviderDefault: typeof Infragistics.ZoombarProviderDefault; } declare namespace Infragistics { - class ZoombarProviderDataChart { - constructor(settings: ZoombarProviderDefaultSettings); - clean(): void; - getBaseOpts(options: Object): void; - cleanOptsForZoom(options: Object): void; - createClone(container: Object, options: Object): void; - widgetName(): void; - targetWidth(): void; - targetObject(obj: Object): void; - syncMinWidth(minWidth: Object): void; - setSize(width: Object, height: Object): void; - update(a: Object, b: Object): void; - } +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; +ZoombarProviderDataChart: typeof Infragistics.ZoombarProviderDataChart; } interface JQuery { @@ -84809,23 +95063,11 @@ interface JQuery { /** * 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. */ @@ -84833,23 +95075,11 @@ interface JQuery { /** * 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. */ @@ -84858,18 +95088,12 @@ interface JQuery { /** * 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. */ @@ -84877,19 +95101,11 @@ interface JQuery { /** * 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. */ @@ -84897,19 +95113,11 @@ interface JQuery { /** * 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. */ @@ -84917,19 +95125,11 @@ interface JQuery { /** * 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. */ @@ -84937,19 +95137,11 @@ interface JQuery { /** * 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. */ @@ -84957,19 +95149,11 @@ interface JQuery { /** * 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. */ @@ -84977,19 +95161,11 @@ interface JQuery { /** * 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. */ @@ -84997,19 +95173,11 @@ interface JQuery { /** * 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. */ diff --git a/types/isomorphic-fetch/tslint.json b/types/isomorphic-fetch/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/isomorphic-fetch/tslint.json +++ b/types/isomorphic-fetch/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/jest-validate/index.d.ts b/types/jest-validate/index.d.ts new file mode 100644 index 0000000000..5ad3d9b4d3 --- /dev/null +++ b/types/jest-validate/index.d.ts @@ -0,0 +1,95 @@ +// Type definitions for jest-validate 21.0 +// Project: https://github.com/facebook/jest/tree/master/packages/jest-validate +// Definitions by: Ika +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 + +export class ValidationError extends Error { + name: string; + message: string; + constructor(name: string, message: string, comment?: string); +} + +export function createDidYouMeanMessage( + unrecognized: string, + allowedOptions: string[] +): string; + +export function format(value: any): string; + +export function logValidationWarning( + name: string, + message: string, + commant?: string +): void; + +export interface Title { + deprecation?: string; + error?: string; + warning?: string; +} + +export interface DeprecatedConfig { + [key: string]: (config: object) => string; +} + +export interface ValidationOptions { + /** + * optional string to be rendered below error/warning message. + */ + comment?: string; + /** + * an optional function with validation condition. + */ + condition?(value: any, exampleValue: any): boolean; + /** + * optional object with deprecated config keys. + */ + deprecatedConfig?: DeprecatedConfig; + /** + * the only **required** option with configuration against which you'd like to test. + */ + exampleConfig: object; + /** + * optional object of titles for errors and messages. + */ + title?: Title; + /** + * optional functions responsible for displaying warning and error messages. + */ + deprecate?( + config: object, + key: string, + deprecatedConfig: DeprecatedConfig, + options: ValidationOptions + ): boolean; + /** + * optional functions responsible for displaying warning and error messages. + */ + error?( + key: string, + received: any, + exampleValue: any, + options: ValidationOptions + ): void; + /** + * optional functions responsible for displaying warning and error messages. + */ + unknown?( + config: object, + exampleConfig: object, + key: string, + options: ValidationOptions + ): void; +} + +/** + * By default jest-validate will print generic warning and error messages. + * You can however customize this behavior by providing `options: ValidationOptions` object as a second argument: + * + * Almost anything can be overwritten to suite your needs. + */ +export function validate( + config: object, + options: ValidationOptions +): { hasDeprecationWarnings: boolean; isValid: boolean }; diff --git a/types/jest-validate/jest-validate-tests.ts b/types/jest-validate/jest-validate-tests.ts new file mode 100644 index 0000000000..28757339fe --- /dev/null +++ b/types/jest-validate/jest-validate-tests.ts @@ -0,0 +1,13 @@ +import { validate, format, createDidYouMeanMessage } from 'jest-validate'; + +validate( + { a: 0 }, + { + condition: () => false, + exampleConfig: { a: 1, b: 2 }, + }, +); + +const formatted = format({ c: 3 }); + +const didYouMeanMessage = createDidYouMeanMessage('bbb', ['aaa', 'ccc']); diff --git a/types/jest-validate/tsconfig.json b/types/jest-validate/tsconfig.json new file mode 100644 index 0000000000..b31c51e81a --- /dev/null +++ b/types/jest-validate/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jest-validate-tests.ts" + ] +} diff --git a/types/jest-validate/tslint.json b/types/jest-validate/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jest-validate/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/jfs/tslint.json b/types/jfs/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/jfs/tslint.json +++ b/types/jfs/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/joi/index.d.ts b/types/joi/index.d.ts index 0772c82fbe..4ae81db885 100644 --- a/types/joi/index.d.ts +++ b/types/joi/index.d.ts @@ -519,6 +519,11 @@ export interface StringSchema extends AnySchema { * Requires the string value to be a valid GUID. */ guid(options?: GuidOptions): StringSchema; + + /** + * Alias for `guid` -- Requires the string value to be a valid GUID + */ + uuid(options?: GuidOptions): StringSchema; /** * Requires the string value to be a valid hexadecimal string. diff --git a/types/jpeg-js/index.d.ts b/types/jpeg-js/index.d.ts new file mode 100644 index 0000000000..b3525b5449 --- /dev/null +++ b/types/jpeg-js/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for jpeg-js 0.3 +// Project: https://github.com/eugeneware/jpeg-js#readme +// Definitions by: Daniel Rosenwasser +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export interface RawImageData { + data: D; + width: number; + height: number; +} + +export function decode(jpegData: ArrayLike | Iterable | ArrayBuffer, useTypedArray: true): RawImageData; +export function decode(jpegData: ArrayLike | Iterable | ArrayBuffer, useTypedArray?: false): RawImageData; +export function decode(jpegData: ArrayLike | Iterable | ArrayBuffer, useTypedArray: boolean): RawImageData; + +export function encode(imgData: RawImageData, qu?: number): RawImageData; diff --git a/types/jpeg-js/jpeg-js-tests.ts b/types/jpeg-js/jpeg-js-tests.ts new file mode 100644 index 0000000000..17bbc4fd5f --- /dev/null +++ b/types/jpeg-js/jpeg-js-tests.ts @@ -0,0 +1,15 @@ +import jpeg = require("jpeg-js"); +import fs = require("fs"); + +const x = fs.readFileSync("hello.jpg"); +const decoded = jpeg.decode(x, true); + +const { width, height } = decoded; + +width; // $ExpectType number +height; // $ExpectType number +decoded.data; // $ExpectType Uint8Array + +fs.writeFileSync("re-encoded.jpg", jpeg.encode({ + width, height, data: decoded.data +}, 50)); diff --git a/types/jpeg-js/tsconfig.json b/types/jpeg-js/tsconfig.json new file mode 100644 index 0000000000..1e3c116f4f --- /dev/null +++ b/types/jpeg-js/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es2015" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "jpeg-js-tests.ts" + ] +} diff --git a/types/jpeg-js/tslint.json b/types/jpeg-js/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/jpeg-js/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/js-quantities/index.d.ts b/types/js-quantities/index.d.ts index ab76433c0d..e90fe72d87 100644 --- a/types/js-quantities/index.d.ts +++ b/types/js-quantities/index.d.ts @@ -69,4 +69,4 @@ declare namespace Qty { type UnitSource = Qty | string; } -export default Qty; +export = Qty; diff --git a/types/js-quantities/js-quantities-tests.ts b/types/js-quantities/js-quantities-tests.ts index 786a9f1a3f..ae171f6da1 100644 --- a/types/js-quantities/js-quantities-tests.ts +++ b/types/js-quantities/js-quantities-tests.ts @@ -1,4 +1,4 @@ -import Qty from "js-quantities"; +import Qty = require("js-quantities"); declare function describe(desc: string, fn: () => void): void; declare function it(desc: string, fn: () => void): void; diff --git a/types/js-to-java/tslint.json b/types/js-to-java/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/js-to-java/tslint.json +++ b/types/js-to-java/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/jsforce/connection.d.ts b/types/jsforce/connection.d.ts index 612bf6fc84..aa32d43ff5 100644 --- a/types/jsforce/connection.d.ts +++ b/types/jsforce/connection.d.ts @@ -1,21 +1,26 @@ import { SObjectCreateOptions } from './create-options'; import { DescribeSObjectResult } from './describe-result'; -import { Query } from './query'; +import { Query, QueryResult } from './query'; import { RecordResult } from './record-result'; import { SObject } from './salesforce-object'; -export interface ConnectionOptions { +// These are pulled out because according to http://jsforce.github.io/jsforce/doc/connection.js.html#line49 +// the oauth options can either be in the `oauth2` proeprty OR spread across the main connection +export interface OAuth2Options { + clientId?: string; + clientSecret?: string; + loginUrl?: string; + redirectUri?: string; +} + +export interface ConnectionOptions extends OAuth2Options { accessToken?: string; callOptions?: Object; instanceUrl?: string; loginUrl?: string; logLevel?: string; maxRequest?: number; - oauth2?: { - clientId: string, - clientSecret: string, - redirectUri?: string, - }; + oauth2?: Partial; proxyUrl?: string; redirectUri?: string; refreshToken?: string; @@ -33,11 +38,33 @@ export interface UserInfo { export type ConnectionEvent = "refresh"; -export class Connection { - constructor(params: ConnectionOptions) +/** + * the methods exposed here are done so that a client can use 'declaration augmentation' to get intellisense on their own projects. + * for example, given a type + * + * interface Foo { + * thing: string; + * yes: boolean; + * } + * + * you can write + * + * declare module "jsforce" { + * interface Connection { + * sobject(type: 'Foo'): SObject + * } + * } + * + * to ensure that you have the correct data types for the various collection names. + */ +export interface Connection { + query(soql: string, callback?: (err: Error, result: QueryResult) => void): QueryResult; + sobject(resource: string): SObject; +} +export class Connection implements Connection { + constructor(params: ConnectionOptions) accessToken: string; - sobject(resource: string): SObject; login(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise; loginByOAuth2(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise; loginBySoap(user: string, password: string, callback?: (err: Error, res: UserInfo) => void): Promise; diff --git a/types/jsforce/index.d.ts b/types/jsforce/index.d.ts index fc7bd017b2..c7d39c9499 100644 --- a/types/jsforce/index.d.ts +++ b/types/jsforce/index.d.ts @@ -3,6 +3,7 @@ // Definitions by: Dolan Miu // Kamil Ejsymont // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 import * as fs from 'fs'; import * as stream from 'stream'; diff --git a/types/jsforce/jsforce-tests.ts b/types/jsforce/jsforce-tests.ts index 3c1657711d..208dba8bc8 100644 --- a/types/jsforce/jsforce-tests.ts +++ b/types/jsforce/jsforce-tests.ts @@ -1,5 +1,11 @@ import * as sf from 'jsforce'; +export interface DummyRecord { + thing: boolean; + other: number; + person: string; +} + const salesforceConnection: sf.Connection = new sf.Connection({ instanceUrl: '', refreshToken: '', @@ -9,6 +15,11 @@ const salesforceConnection: sf.Connection = new sf.Connection({ }, }); +salesforceConnection.sobject("Dummy").select(["thing", "other"]); + +// note the following should never compile: +// salesforceConnection.sobject("Dummy").select(["lol"]); + salesforceConnection.sobject("Account").create({ Name: "Test Acc 2", BillingStreet: "Maplestory street", @@ -30,9 +41,9 @@ salesforceConnection.sobject("ContentVersion").create({ } }); -salesforceConnection.sobject("ContentVersion").retrieve("world", { +salesforceConnection.sobject("ContentVersion").retrieve("world", { test: "test" -}, (err: Error, ret: sf.Record) => { +}, (err: Error, ret) => { if (err) { return; } diff --git a/types/jsforce/query.d.ts b/types/jsforce/query.d.ts index 42d258a48d..00b90a9464 100644 --- a/types/jsforce/query.d.ts +++ b/types/jsforce/query.d.ts @@ -7,7 +7,14 @@ export interface ExecuteOptions { scanAll?: number; } -export class Query { +export interface QueryResult { + done: boolean; + nextRecordsUrl?: string; + totalSize: number; + records: T[]; +} + +export class Query extends Promise { end(): Query; filter(filter: Object): Query; include(include: string): Query; @@ -27,7 +34,6 @@ export class Query { map(callback: (currentValue: Object) => void): Promise; scanAll(value: boolean): Query; select(fields: Object | string[] | string): Query; - then(onSuccess?: Function, onRejected?: Function): Promise; thenCall(callback?: (err: Error, records: T) => void): Query; toSOQL(callback: (err: Error, soql: string) => void): Promise; update(mapping: any, type: string, callback: (err: Error, records: RecordResult[]) => void): Promise; diff --git a/types/jsforce/record-result.d.ts b/types/jsforce/record-result.d.ts index bf53a5bf98..df77ef26d3 100644 --- a/types/jsforce/record-result.d.ts +++ b/types/jsforce/record-result.d.ts @@ -1,7 +1,13 @@ import { SalesforceId } from './salesforce-id'; -export interface RecordResult { - id: SalesforceId; - success: boolean; - anys: Object[]; +interface ErrorResult { + errors: string[]; + success: false; } + +interface SuccessResult { + id: SalesforceId; + success: true; +} + +export type RecordResult = SuccessResult | ErrorResult; diff --git a/types/jsforce/record.d.ts b/types/jsforce/record.d.ts index 3bfec4c65b..3dd0bca1da 100644 --- a/types/jsforce/record.d.ts +++ b/types/jsforce/record.d.ts @@ -1,6 +1,16 @@ +import { RecordResult } from './record-result'; +import { Connection } from './connection'; import { SalesforceId } from './salesforce-id'; +import { Stream } from 'stream'; -export interface Record { - Id: SalesforceId; - attributes: Object[]; +export class RecordReference { + constructor(conn: Connection, type: string, id: SalesforceId); + blob(fieldName: string): Stream; + del(options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise; + delete(options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise; + destroy(options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise; + retrieve(options?: Object, callback?: (err: Error, record: Record) => void): Promise>; + update(record: Partial, options?: Object, callback?: (err: Error, result: RecordResult) => void): Promise; } + +export type Record = {Id: SalesforceId } & T; diff --git a/types/jsforce/salesforce-object.d.ts b/types/jsforce/salesforce-object.d.ts index 31da3a2c92..2f1f1590bf 100644 --- a/types/jsforce/salesforce-object.d.ts +++ b/types/jsforce/salesforce-object.d.ts @@ -3,18 +3,20 @@ import * as stream from 'stream'; import { SObjectCreateOptions } from './create-options'; import { DescribeSObjectResult } from './describe-result'; import { Query } from './query'; -import { Record } from './record'; +import { Record, RecordReference } from './record'; import { RecordResult } from './record-result'; import { Connection } from './connection'; import { SalesforceId } from './salesforce-id'; -export class SObject { - record(options: any, callback?: (err: Error, ret: any) => void): void; - update(options: SObjectCreateOptions, callback?: (err: Error, ret: any) => void): void; - retrieve(ids: string | string[], callback?: (err: Error, ret: Record | Record[]) => void): Promise; - retrieve(ids: string | string[], options?: Object, callback?: (err: Error, ret: Record | Record[]) => void): Promise; - upsert(records: Record | Record[], extIdField: SalesforceId, options?: Object, callback?: (err: Error, ret: RecordResult) => void): Promise; - upsertBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; +export class SObject { + record(id: SalesforceId): RecordReference; + retrieve(id: SalesforceId, options?: Object, callback?: (err: Error, record: Record) => void): Promise>; + retrieve(ids: SalesforceId[], options?: Object, callback?: (err: Error, ret: Array>) => void): Promise>>; + update(record: Partial, options?: Object, callback?: (err: Error, ret: RecordResult) => void): Promise; + update(records: Array>, options?: Object, callback?: (err: Error, ret: RecordResult[]) => void): Promise; + upsert(records: Record, extIdField: SalesforceId, options?: Object, callback?: (err: Error, ret: RecordResult) => void): Promise; + upsert(records: Array>, extIdField: SalesforceId, options?: Object, callback?: (err: Error, ret: RecordResult[]) => void): Promise; + upsertBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult[] | BatchResultInfo[]) => void): Batch; describeGlobal(callback: (err: Error, res: any) => void): void; describe$(callback: (err: Error, ret: DescribeSObjectResult) => void): void; describeGlobal$(callback: (err: Error, res: any) => void): void; @@ -28,39 +30,37 @@ export class SObject { findOne(query?: any, fields?: Object | string[] | string, options?: Object, callback?: (err: Error, ret: T) => void): void; approvalLayouts(callback?: (layoutInfo: ApprovalLayoutInfo) => void): Promise; - bulkload(operation: string, options?: { extIdField?: string }, input?: Record[] | stream.Stream[] | string[], callback?: (err: Error, ret: RecordResult) => void): Batch; + bulkload(operation: string, options?: { extIdField?: string }, input?: Array> | stream.Stream[] | string[], callback?: (err: Error, ret: RecordResult) => void): Batch; compactLayouts(callback?: CompactLayoutInfo): Promise; count(conditions?: Object | string, callback?: (err: Error, num: number) => void): Promise; create(options: any | any[], callback?: (err: Error, ret: RecordResult | RecordResult[]) => void): Promise; - createBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; + createBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; del(ids: string | string[], callback?: (err: Error, ret: any) => void): void; destroy(ids: string | string[], callback?: (err: Error, ret: any) => void): void; delete(ids: string | string[], callback?: (err: Error, ret: any) => void): void; - deleteBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; - destroyBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; - destroyHardBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; + deleteBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; + destroyBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; + destroyHardBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; deleted(start: Date | string, end: Date | string, callback?: (info: DeletedRecordsInfo) => void): Promise; - deleteHardBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; + deleteHardBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; describe(callback?: (err: Error, ret: DescribeSObjectResult) => void): Promise; insert(options: any | any[], callback?: (err: Error, ret: RecordResult | RecordResult[]) => void): Promise; - insertBulk(input?: Record[] | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; + insertBulk(input?: Array> | stream.Stream | string, callback?: (err: Error, ret: RecordResult) => void): Batch; layouts(layoutName?: string, callback?: (err: Error, info: LayoutInfo) => void): Promise; listview(id: string): ListView; listviews(callback?: (err: Error, info: ListViewsInfo) => void): Promise; quickAction(actionName: string): QuickAction; quickActions(callback?: (err: Error, info: any) => void): Promise; recent(callback?: (err: Error, ret: RecordResult) => void): Promise; - select(field?: Object | string[] | string, callback?: (err: Error, ret: T[]) => void): Query; + select(callback?: (err: Error, ret: T[]) => void): Promise; + // TODO:use a typed pluck to turn `fields` into a subset of T's fields so that the output is slimmed down appropriately + select(fields?: {[P in keyof T]: boolean} | Array<(keyof T)> | (keyof T), callback?: (err: Error, ret: Array>) => void): Promise>>; } export interface ApprovalLayoutInfo { approvalLayouts: Object[]; } -export class Record extends Object { - constructor(connection: Connection, type: SObject, id: SalesforceId) -} - export class Batch extends stream.Writable { } @@ -85,7 +85,20 @@ export interface LayoutInfo { } export class ListView { - constructor(connection: Connection, type: SObject, id: SalesforceId) + constructor(connection: Connection, type: string, id: SalesforceId) +} + +export interface BatchInfo { + id: string; + jobId: string; + state: string; + stateMessage: string; +} + +export interface BatchResultInfo { + id: string; + batchId: string; + jobId: string; } export class ListViewsInfo { } diff --git a/types/jsnox/tslint.json b/types/jsnox/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/jsnox/tslint.json +++ b/types/jsnox/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/jsonrpc-serializer/tslint.json b/types/jsonrpc-serializer/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/jsonrpc-serializer/tslint.json +++ b/types/jsonrpc-serializer/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/jwt-decode/tslint.json b/types/jwt-decode/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/jwt-decode/tslint.json +++ b/types/jwt-decode/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/jwt-decode/v1/tslint.json b/types/jwt-decode/v1/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/jwt-decode/v1/tslint.json +++ b/types/jwt-decode/v1/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/kefir/index.d.ts b/types/kefir/index.d.ts index 09917d7846..e892e1b291 100644 --- a/types/kefir/index.d.ts +++ b/types/kefir/index.d.ts @@ -1,10 +1,14 @@ -// Type definitions for Kefir 3.3.0 +// Type definitions for Kefir 3.7.3 // Project: http://rpominov.github.io/kefir/ // Definitions by: Aya Morisawa +// Piotr Hitori Bosak // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 /// +export type ValueOfAnObservable> = T['']; + export interface Subscription { unsubscribe(): void; closed: boolean; // Actually, `readonly` but it's avaiable in tsc starting with 2.0.0 @@ -28,19 +32,25 @@ export interface Observer { } export interface Observable { + '': T; // TypeScript hack to enable value unwrapping for combine/flatMap + + toProperty(getCurrent?: () => T): Property; // Subscribe / add side effects - onValue(callback: (value: T) => void): void; - offValue(callback: (value: T) => void): void; - onError(callback: (error: S) => void): void; - offError(callback: (error: S) => void): void; - onEnd(callback: () => void): void; - offEnd(callback: () => void): void; - onAny(callback: (event: Event) => void): void; - offAny(callback: (event: Event) => void): void; - log(name?: string): void; - offLog(name?: string): void; + onValue(callback: (value: T) => void): this; + offValue(callback: (value: T) => void): this; + onError(callback: (error: S) => void): this; + offError(callback: (error: S) => void): this; + onEnd(callback: () => void): this; + offEnd(callback: () => void): this; + onAny(callback: (event: Event) => void): this; + offAny(callback: (event: Event) => void): this; + log(name?: string): this; + spy(name?: string): this; + offLog(name?: string): this; + offSpy(name?: string): this; flatten(transformer?: (value: T) => U[]): Stream; - toPromise(PromiseConstructor?: any): any; + toPromise(): Promise; + toPromise>(PromiseConstructor: () => W): W; toESObservable(): any; // This method is designed to replace all other methods for subscribing observe(params: Observer): Subscription; @@ -49,11 +59,11 @@ export interface Observable { onError?: (error: S) => void, onEnd?: () => void ): Subscription; + setName(source: Observable, selfName: string): this; + setName(selfName: string): this; } export interface Stream extends Observable { - toProperty(getCurrent?: () => T): Property; - // Modify an stream map(fn: (value: T) => U): Stream; filter(predicate?: (value: T) => boolean): Stream; @@ -64,7 +74,8 @@ export interface Stream extends Observable { skipWhile(predicate?: (value: T) => boolean): Stream; skipDuplicates(comparator?: (a: T, b: T) => boolean): Stream; diff(fn?: (prev: T, next: T) => T, seed?: T): Stream; - scan(fn: (prev: T, next: T) => T, seed?: T): Stream; + scan(fn: (prev: T | W, next: T) => W): Stream; + scan(fn: (prev: W, next: T) => W, seed: W): Stream; delay(wait: number): Stream; throttle(wait: number, options?: { leading?: boolean, trailing?: boolean }): Stream; debounce(wait: number, options?: { immediate: boolean }): Stream; @@ -85,19 +96,21 @@ export interface Stream extends Observable { bufferWithTimeOrCount(interval: number, count: number, options?: { flushOnEnd: boolean }): Stream; transduce(transducer: any): Stream; withHandler(handler: (emitter: Emitter, event: Event) => void): Stream; - // Combine streams combine(otherObs: Stream, combinator?: (value: T, ...values: U[]) => W): Stream; zip(otherObs: Stream, combinator?: (value: T, ...values: U[]) => W): Stream; merge(otherObs: Stream): Stream; concat(otherObs: Stream): Stream; flatMap(transform: (value: T) => Stream): Stream; + flatMap>(): Stream, any>; flatMapLatest(fn: (value: T) => Stream): Stream; + flatMapLatest>(): Stream, any>; flatMapFirst(fn: (value: T) => Stream): Stream; + flatMapFirst>(): Stream, any>; flatMapConcat(fn: (value: T) => Stream): Stream; + flatMapConcat>(): Stream, any>; flatMapConcurLimit(fn: (value: T) => Stream, limit: number): Stream; flatMapErrors(transform: (error: S) => Stream): Stream; - // Combine two streams filterBy(otherObs: Observable): Stream; sampledBy(otherObs: Observable, combinator?: (a: T, b: U) => W): Stream; @@ -110,7 +123,6 @@ export interface Stream extends Observable { export interface Property extends Observable { changes(): Stream; - // Modify an property map(fn: (value: T) => U): Property; filter(predicate?: (value: T) => boolean): Property; @@ -141,19 +153,20 @@ export interface Property extends Observable { bufferWithTimeOrCount(interval: number, count: number, options?: { flushOnEnd: boolean }): Property; transduce(transducer: any): Property; withHandler(handler: (emitter: Emitter, event: Event) => void): Property; - // Combine properties combine(otherObs: Property, combinator?: (value: T, ...values: U[]) => W): Property; zip(otherObs: Property, combinator?: (value: T, ...values: U[]) => W): Property; merge(otherObs: Property): Property; concat(otherObs: Property): Property; flatMap(transform: (value: T) => Property): Property; + flatMap>(): Property, any>; flatMapLatest(fn: (value: T) => Property): Property; + flatMapLatest>(): Property, any>; flatMapFirst(fn: (value: T) => Property): Property; + flatMapFirst>(): Property, any>; flatMapConcat(fn: (value: T) => Property): Property; flatMapConcurLimit(fn: (value: T) => Property, limit: number): Property; flatMapErrors(transform: (error: S) => Property): Property; - // Combine two properties filterBy(otherObs: Observable): Property; sampledBy(otherObs: Observable, combinator?: (a: T, b: U) => W): Property; @@ -165,8 +178,8 @@ export interface Property extends Observable { } export interface ObservablePool extends Observable { - plug(obs: Observable): void; - unPlug(obs: Observable): void; + plug(obs: Observable): this; + unPlug(obs: Observable): this; } export interface Event { @@ -197,11 +210,21 @@ export declare function fromESObservable(observable: any): Stream // Create a property export declare function constant(value: T): Property; export declare function constantError(error: T): Property; -export declare function fromPromise(promise: any): Property; - +export declare function fromPromise(promise: Promise): Property; // Combine observables -export declare function combine(obss: Observable[], passiveObss: Observable[], combinator?: (...values: T[]) => U): Observable; -export declare function combine(obss: Observable[], combinator?: (...values: T[]) => U): Observable; +export declare function combine(obss: Observable[], passiveObss: Observable[], combinator?: (...values: T[]) => U): Stream; +export declare function combine(obss: Observable[], combinator: (...values: T[]) => U): Stream; +export declare function combine }>(obss: T): Stream<{ [P in keyof T]: ValueOfAnObservable }, any>; +export declare function combine], P extends keyof T>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable, Observable, Observable, Observable, Observable, Observable, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable, Observable, Observable, Observable, Observable, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable, Observable, Observable, Observable, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable, Observable, Observable, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable, Observable, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine, Observable]>(obss: T): Stream<[ValueOfAnObservable, ValueOfAnObservable], any>; +export declare function combine]>(obss: T): Stream<[ValueOfAnObservable], any>; +export declare function combine(obss: T): Stream; export declare function zip(obss: Observable[], passiveObss?: Observable[], combinator?: (...values: T[]) => U): Observable; export declare function merge(obss: Observable[]): Observable; export declare function concat(obss: Observable[]): Observable; diff --git a/types/ko.plus/index.d.ts b/types/ko.plus/index.d.ts index 803a56fb74..3952ffaab7 100644 --- a/types/ko.plus/index.d.ts +++ b/types/ko.plus/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// /// /** @@ -21,6 +20,10 @@ * * Version 1.2 - amended callback on commmand.fail() method - accepts response, * status and message values + * + * Version 1.3 - added module declaration so it be used with node, requirejs etc. + * removed jquery reference as it is not required + * */ // @@ -156,3 +159,9 @@ declare namespace KoPlus { //#endregion } + +declare var ko: KnockoutStatic; + +declare module "ko.plus" { + export = ko; +} \ No newline at end of file diff --git a/types/ko.plus/ko.plus-tests.ts b/types/ko.plus/ko.plus-tests.ts index d3472c0d82..3abf2c3c92 100644 --- a/types/ko.plus/ko.plus-tests.ts +++ b/types/ko.plus/ko.plus-tests.ts @@ -1,3 +1,4 @@ + function CommandTests() { // initalize command with an execute method var cmd1 = ko.command(() => { @@ -64,7 +65,7 @@ function EditableTests() { // test editable var isEditing = edit1.isEditing(); - // test editableArray functions: + // test editable functions: edit1.beginEdit(); edit1.endEdit(); edit1.cancelEdit(); @@ -88,7 +89,7 @@ function EditableArrayTests() { // test properties var isEditing = edit1.isEditing(); - // test functions: + // test editable array functions: edit1.beginEdit(); edit1.endEdit(); edit1.cancelEdit(); @@ -118,4 +119,14 @@ function SortableTests() { sort2.sortDescending(true); sort2.setSourceKey("name"); sort2.sortDescending(false); + +} + +function BindingHandlerTests() { + + // test binding handlers + var bh1 = ko.bindingHandlers.command; + var bh2 = ko.bindingHandlers.loadingWhen; + var bh3 = ko.bindingHandlers.sortBy; + } \ No newline at end of file diff --git a/types/lodash/v3/index.d.ts b/types/lodash/v3/index.d.ts index b4e9f78ab8..aba8a60fe4 100644 --- a/types/lodash/v3/index.d.ts +++ b/types/lodash/v3/index.d.ts @@ -13727,6 +13727,29 @@ declare module _ { mapValues(where: Dictionary): LoDashImplicitArrayWrapper; } + interface LoDashExplicitObjectWrapperBase { + /** + * @see _.mapValues + * TValue is the type of the property values of T. + * TResult is the type output by the ObjectIterator function + */ + mapValues(callback: ObjectIterator): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the property specified by pluck. + * T should be a Dictionary> + */ + mapValues(pluck: string): LoDashExplicitObjectWrapper>; + + /** + * @see _.mapValues + * TResult is the type of the properties of each object in the values of T + * T should be a Dictionary> + */ + mapValues(where: Dictionary): LoDashExplicitObjectWrapper; + } + //_.merge interface MergeCustomizer { (value: any, srcValue: any, key?: string, object?: Object, source?: Object): any; diff --git a/types/lru-cache/tslint.json b/types/lru-cache/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/lru-cache/tslint.json +++ b/types/lru-cache/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/map-obj/tslint.json b/types/map-obj/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/map-obj/tslint.json +++ b/types/map-obj/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index c2a9a3d41e..015aa21bce 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Mapbox GL JS v0.39.1 // Project: https://github.com/mapbox/mapbox-gl-js -// Definitions by: Dominik Bruderer +// Definitions by: Dominik Bruderer , Patrick Reames // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -395,12 +395,16 @@ declare namespace mapboxgl { timeout?: number; maximumAge?: number; } + + export class FitBoundsOptions { + maxZoom?: number; + } /** * Geolocate */ export class GeolocateControl extends Control { - constructor(options?: {positionOptions?: PositionOptions, watchPosition?: boolean}); + constructor(options?: {positionOptions?: PositionOptions, fitBoundsOptions?: FitBoundsOptions, trackUserLocation?: boolean, showUserLocation?: boolean}); } /** @@ -991,6 +995,7 @@ declare namespace mapboxgl { "icon-ignore-placement"?: boolean; "icon-optional"?: boolean; "icon-rotation-alignment"?: "map" | "viewport" | "auto"; + "icon-pitch-alignment"?: "map" | "viewport"| "auto"; "icon-size"?: number | StyleFunction; "icon-text-fit"?: "none" | "both" | "width" | "height"; "icon-text-fit-padding"?: number[]; @@ -1064,6 +1069,7 @@ declare namespace mapboxgl { "circle-translate"?: number[]; "circle-translate-anchor"?: "map" | "viewport"; "circle-pitch-scale"?: "map" | "viewport"; + "circle-pitch-alignment"?: "map" | "viewport"; "circle-stroke-width"?: number | StyleFunction; "circle-stroke-color"?: string | StyleFunction; "circle-stroke-opacity"?: number | StyleFunction; diff --git a/types/markdown-it/index.d.ts b/types/markdown-it/index.d.ts index 31605f32b3..5f5129e8b0 100644 --- a/types/markdown-it/index.d.ts +++ b/types/markdown-it/index.d.ts @@ -14,6 +14,7 @@ interface MarkdownItStatic { declare var MarkdownIt: MarkdownItStatic; export = MarkdownIt; +export as namespace markdownit; declare module MarkdownIt { interface MarkdownIt { diff --git a/scripts/material-ui/README.md b/types/material-ui/scripts/README.md similarity index 100% rename from scripts/material-ui/README.md rename to types/material-ui/scripts/README.md diff --git a/types/material-ui/scripts/generate.ts b/types/material-ui/scripts/generate.ts new file mode 100644 index 0000000000..f8024d5805 --- /dev/null +++ b/types/material-ui/scripts/generate.ts @@ -0,0 +1,151 @@ +// Usage: ts-node generate.ts + +/// + +import {get} from 'https'; +import {readdir, readFile, writeFile} from 'fs'; +import {join, extname, basename, dirname, relative} from 'path'; + +const token = process.env.GITHUB_ACCESS_TOKEN || '' + +const toMixedCase = (name) => { + let dist = name[0].toUpperCase() + for (let i = 1; i < name.length; i++) { + const c = name[i] + if (c !== '-') { + dist += c + continue + } + i++ + dist += name[i].toUpperCase() + } + return dist +} + +const github = (path) => new Promise((resolve, reject) => { + get({ + headers: {'user-agent': 'DefinitelyTyped/material-ui/generate'}, + host: 'api.github.com', + path, + }, (res) => { + if ((res.statusCode / 100 >> 0) != 2) { + reject(`GitHub response: ${res.statusCode} ${res.statusMessage}`) + return + } + let data = ''; + res + .on('data', (chunk) => data += chunk) + .on('end', () => resolve(JSON.parse(data))) + }).on('error', reject) +}) + +const categories = () => github(`/repos/callemall/material-ui/contents/src/svg-icons?ref=master&access_token=${token}`) + +const contents = (path) => github(`/repos/callemall/material-ui/contents/${path}?ref=master&access_token=${token}`) + +const collator = new Intl.Collator() + +const resolvePath = (filename) => join(__dirname, '..', filename) + +const readText = (filename) => new Promise((resolve, reject) => { + readFile(resolvePath(filename), 'utf8', (err, data) => { + if (err != null) { + reject(err) + return + } + resolve(data) + }) +}) + +const writeText = (filename, text) => new Promise((resolve, reject) => { + writeFile(resolvePath(filename), text, 'utf8', (err) => { + if (err != null) { + reject(err) + return + } + resolve() + }) +}) + +const inject = (content) => { + content.category = this.name + return content +} + +const rMark = /(\/{2} \{{3})[\s\S]*?(\/{2} \}{3})/g + +main().catch((err) => console.error(err)); + +async function main() { + const cats = await categories(); + const contentsList = await Promise.all(Array.prototype.map.call(cats, (cat) => contents(cat.path) + .then((cons) => Array.prototype.map.call(cons, (con) => { + con.category = cat.name + return con + })) + )); + const { dts, test } = await Array.prototype.concat.apply([], contentsList) + .map((content) => { + const {path} = content + const name = basename(path, extname(path)) + content.id = join(relative('src', dirname(path)), name) + content.className = toMixedCase(content.category) + toMixedCase(name) + return content + }) + .sort((a, b) => collator.compare(a.id, b.id)) + .reduce((prev, content) => { + const {dts, test} = prev + dts.individuals.push(`declare module 'material-ui/${content.id}' { + export import ${content.className} = __MaterialUI.SvgIcon; + export default ${content.className}; +}`) + dts.summarizeds.push(` export import ${content.className} = __MaterialUI.SvgIcon; // require('material-ui/${content.id}');`) + + test.individuals.push(`import _${content.className} from 'material-ui/${content.id}';`) + test.summarizeds.push(` ${content.className},`) + return prev + }, { + dts: {individuals: [], summarizeds: []}, + test: {individuals: [], summarizeds: []}, + }); + + { + const {individuals, summarizeds} = dts + const file = 'index.d.ts' + let index = 0 + const script = await readText(file) + await writeText(file, script.replace(rMark, (_, p1, p2) => { + let text = '' + switch (index) { + case 0: + text = individuals.join('\n\n') + break + case 1: + text = summarizeds.join('\n') + break + } + index++ + return p1 + '\n' + text + '\n' + p2 + })) + } + + { + const {individuals, summarizeds} = test + const file = 'material-ui-tests.tsx' + let index = 0 + const script = await readText(file) + await writeText(file, script.replace(rMark, (_, p1, p2) => { + let text = '' + switch (index) { + case 0: + text = individuals.join('\n') + break + case 1: + text = summarizeds.join('\n') + break + } + index++ + return p1 + '\n' + text + '\n' + p2 + })) + } +} diff --git a/types/material-ui/scripts/tsconfig.json b/types/material-ui/scripts/tsconfig.json new file mode 100644 index 0000000000..a06b8ed24f --- /dev/null +++ b/types/material-ui/scripts/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "es6", + "baseUrl": "../..", + "typeRoots": [ + "../../" + ], + "types": [] + } +} \ No newline at end of file diff --git a/types/mem/tslint.json b/types/mem/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/mem/tslint.json +++ b/types/mem/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/meteor/ejson.d.ts b/types/meteor/ejson.d.ts index 45ae2627c0..a6294fb8be 100644 --- a/types/meteor/ejson.d.ts +++ b/types/meteor/ejson.d.ts @@ -5,10 +5,10 @@ interface EJSONableCustomType { typeName(): string; } interface EJSONable { - [key: string]: number | string | boolean | Object | number[] | string[] | Object[] | Date | Uint8Array | EJSONableCustomType; + [key: string]: number | string | boolean | Object | number[] | string[] | Object[] | Date | Uint8Array | EJSONableCustomType | undefined | null; } interface JSONable { - [key: string]: number | string | boolean | Object | number[] | string[] | Object[]; + [key: string]: number | string | boolean | Object | number[] | string[] | Object[] | undefined | null; } interface EJSON extends EJSONable { } @@ -44,10 +44,10 @@ declare module "meteor/ejson" { typeName(): string; } interface EJSONable { - [key: string]: number | string | boolean | Object | number[] | string[] | Object[] | Date | Uint8Array | EJSONableCustomType; + [key: string]: number | string | boolean | Object | number[] | string[] | Object[] | Date | Uint8Array | EJSONableCustomType | undefined | null; } interface JSONable { - [key: string]: number | string | boolean | Object | number[] | string[] | Object[]; + [key: string]: number | string | boolean | Object | number[] | string[] | Object[] | undefined | null; } interface EJSON extends EJSONable { } diff --git a/types/meteor/mongo.d.ts b/types/meteor/mongo.d.ts index af632bdab1..99f931ec28 100644 --- a/types/meteor/mongo.d.ts +++ b/types/meteor/mongo.d.ts @@ -214,7 +214,10 @@ declare module "meteor/mongo" { interface ObjectIDStatic { new (hexString?: string): ObjectID; } - interface ObjectID { } + interface ObjectID { + toHexString(): string; + equals(otherID: ObjectID): boolean; + } function setConnectionOptions(options: any): void; } diff --git a/types/mocha/index.d.ts b/types/mocha/index.d.ts index bc2f69a0a4..07f59e6628 100644 --- a/types/mocha/index.d.ts +++ b/types/mocha/index.d.ts @@ -17,7 +17,7 @@ interface MochaSetupOptions { globals?: any[]; // reporter instance (function or string), defaults to `mocha.reporters.Spec` - reporter?: any; + reporter?: string | ReporterConstructor; // bail on the first test failure bail?: boolean; @@ -62,12 +62,16 @@ declare function beforeEach(description: string, callback: (this: Mocha.IBeforeA declare function afterEach(callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; declare function afterEach(description: string, callback: (this: Mocha.IBeforeAndAfterContext, done: MochaDone) => any): void; +interface ReporterConstructor { + new(runner: Mocha.IRunner, options: any): any; +} + declare class Mocha { currentTest: Mocha.ITestDefinition; constructor(options?: { grep?: RegExp; ui?: string; - reporter?: string; + reporter?: string | ReporterConstructor; timeout?: number; reporterOptions?: any; slow?: number; @@ -81,7 +85,7 @@ declare class Mocha { /** Sets reporter by name, defaults to "spec". */ reporter(name: string): Mocha; /** Sets reporter constructor, defaults to mocha.reporters.Spec. */ - reporter(reporter: (runner: Mocha.IRunner, options: any) => any): Mocha; + reporter(reporter: ReporterConstructor): Mocha; ui(value: string): Mocha; grep(value: string): Mocha; grep(value: RegExp): Mocha; @@ -154,7 +158,7 @@ declare namespace Mocha { interface ITest extends IRunnable { parent: ISuite; pending: boolean; - state: 'failed'|'passed'|undefined; + state: 'failed' | 'passed' | undefined; fullTitle(): string; } diff --git a/types/mocha/mocha-tests.ts b/types/mocha/mocha-tests.ts index 7271ebbd0c..55ba6fa961 100644 --- a/types/mocha/mocha-tests.ts +++ b/types/mocha/mocha-tests.ts @@ -105,7 +105,7 @@ function test_before() { } function test_setup() { - setup(function() { + setup(function () { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -113,9 +113,9 @@ function test_setup() { string = this.currentTest.title; string = this.currentTest.fullTitle(); string = this.currentTest.state; - }); + }); - setup(function() { + setup(function () { this['sharedState'] = true; boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -124,7 +124,7 @@ function test_setup() { string = this.currentTest.title; string = this.currentTest.fullTitle(); string = this.currentTest.state; - }); + }); setup(function (done) { done(); @@ -151,7 +151,7 @@ function test_after() { } function test_teardown() { - teardown(function() { + teardown(function () { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -161,7 +161,7 @@ function test_teardown() { string = this.currentTest.state; }); - teardown(function() { + teardown(function () { this['sharedState'] = true; boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -172,7 +172,7 @@ function test_teardown() { string = this.currentTest.state; }); - teardown(function(done) { + teardown(function (done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -217,7 +217,7 @@ function test_beforeEach() { string = this.currentTest.state; }); - beforeEach("my description", function() { + beforeEach("my description", function () { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -227,7 +227,7 @@ function test_beforeEach() { string = this.currentTest.state; }); - beforeEach("my description", function(done) { + beforeEach("my description", function (done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -280,7 +280,7 @@ function test_afterEach() { string = this.currentTest.state; }); - afterEach("my description", function() { + afterEach("my description", function () { boolean = this.currentTest.async; boolean = this.currentTest.pending; boolean = this.currentTest.sync; @@ -290,7 +290,7 @@ function test_afterEach() { string = this.currentTest.state; }); - afterEach("my description", function(done) { + afterEach("my description", function (done) { done(); boolean = this.currentTest.async; boolean = this.currentTest.pending; @@ -316,7 +316,7 @@ function test_reporter_string() { } function test_reporter_function() { - mocha.reporter(function () { }); + mocha.reporter(class { }); } function test_setup_slow_option() { @@ -340,7 +340,7 @@ function test_setup_reporter_string_option() { } function test_setup_reporter_function_option() { - mocha.setup({ reporter: function () { } }); + mocha.setup({ reporter: class { } }); } function test_setup_bail_option() { @@ -389,7 +389,7 @@ function test_chaining() { .setup({ slow: 25 }) .growl() .reporter('html') - .reporter(function () { }); + .reporter(class { }); } import MochaDef = require('mocha'); diff --git a/types/mongoose-simple-random/index.d.ts b/types/mongoose-simple-random/index.d.ts index 16b1c21483..679ba1fbee 100644 --- a/types/mongoose-simple-random/index.d.ts +++ b/types/mongoose-simple-random/index.d.ts @@ -15,7 +15,7 @@ declare module 'mongoose-simple-random' { declare module "mongoose" { interface Model extends NodeJS.EventEmitter, ModelProperties { - findRandom(conditions: Object, projection?: Object | null, options?: Object | null, callback?: (err: any, res: T[]) => void) + findRandom(conditions: Object, projection?: Object | null, options?: Object | null, callback?: (err: any, res?: T[]) => void) : void; } } diff --git a/types/moonjs/tslint.json b/types/moonjs/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/moonjs/tslint.json +++ b/types/moonjs/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/msgpack-lite/tslint.json b/types/msgpack-lite/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/msgpack-lite/tslint.json +++ b/types/msgpack-lite/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/nano/index.d.ts b/types/nano/index.d.ts index ab80e563d4..45e70ee70e 100644 --- a/types/nano/index.d.ts +++ b/types/nano/index.d.ts @@ -1,14 +1,17 @@ -// Type definitions for nano 6.2 +// Type definitions for nano 6.4 // Project: https://github.com/apache/couchdb-nano // Definitions by: Tim Jacobi +// Kovács Vince // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +/// + import { EventEmitter } from "events"; -import { Request, CoreOptions } from "request"; +import { CoreOptions, Request } from "request"; declare function nano( config: nano.Configuration | string -): nano.ServerScope | nano.DocumentScope; +): nano.ServerScope | nano.DocumentScope; declare namespace nano { interface Configuration { @@ -19,169 +22,280 @@ declare namespace nano { request?(params: any): void; } - type Callback = (error: any, result: any, headers?: any) => void; + type Callback = (error: any, response: R, headers?: any) => void; interface ServerScope { readonly config: ServerConfig; db: DatabaseScope; - use(db: string): DocumentScope; - scope(db: string): DocumentScope; + use(db: string): DocumentScope; + scope(db: string): DocumentScope; request: RequestFunction; relax: RequestFunction; dinosaur: RequestFunction; - auth(username: string, userpass: string, callback?: Callback): Request; - session(callback?: Callback): Request; - updates(params?: UpdatesParams, callback?: Callback): Request; - followUpdates(params?: any, callback?: Callback): EventEmitter; - uuids(num: number, callback: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/authn.html#cookie-authentication + auth(username: string, userpass: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/authn.html#get--_session + session(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates + updates(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates + updates(params: UpdatesParams, callback?: Callback): Request; + followUpdates(callback?: Callback): EventEmitter; + followUpdates(params: any, callback?: Callback): EventEmitter; + uuids(num: number, callback: Callback): Request; } interface DatabaseScope { - create(name: string, callback?: Callback): Request; - get(name: string, callback?: Callback): Request; - destroy(name: string, callback?: Callback): Request; - list(callback?: Callback): Request; - use(db: string): DocumentScope; - compact(name: string, designname?: string, callback?: Callback): Request; - replicate( - source: string | DocumentScope, - target: string | DocumentScope, - options?: any, - callback?: Callback + // http://docs.couchdb.org/en/latest/api/database/common.html#put--db + create(name: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/common.html#get--db + get(name: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/common.html#delete--db + destroy(name: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_all_dbs + list(callback?: Callback): Request; + use(db: string): DocumentScope; + compact(name: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/compact.html#post--db-_compact + compact(name: string, designname: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + replicate( + source: string | DocumentScope, + target: string | DocumentScope, + callback?: Callback ): Request; - changes(name: string, params?: any, callback?: Callback): Request; - follow( - source: string, - params?: DatabaseScopeFollowUpdatesParams, - callback?: Callback - ): EventEmitter; - followUpdates(params?: any, callback?: Callback): EventEmitter; - updates(params?: UpdatesParams, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + replicate( + source: string | DocumentScope, + target: string | DocumentScope, + options: DatabaseReplicateOptions, + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes + changes(name: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/compact.html#post--db-_compact + changes(name: string, params: DatabaseChangesParams, callback?: Callback): Request; + follow(source: string, callback?: Callback): EventEmitter; + follow(source: string, params: DatabaseScopeFollowUpdatesParams, callback?: Callback): EventEmitter; + followUpdates(params?: any, callback?: Callback): EventEmitter; + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates + updates(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates + updates(params: UpdatesParams, callback?: Callback): Request; } - interface DocumentScope { + interface DocumentScope { readonly config: ServerConfig; - info(callback?: Callback): Request; - replicate( - target: string | DocumentScope, - options?: any, - callback?: Callback + // http://docs.couchdb.org/en/latest/api/database/common.html#get--db + info(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + replicate( + target: string | DocumentScope, + callback?: Callback ): Request; - compact(callback?: Callback): Request; - changes(params?: any, callback?: Callback): Request; - follow( - params?: DocumentScopeFollowUpdatesParams, - callback?: Callback - ): EventEmitter; - auth(username: string, userpass: string, callback?: Callback): Request; - session(callback?: Callback): Request; - insert(document: any, params?: any, callback?: Callback): Request; - get(docname: string, params?: any, callback?: Callback): Request; - head(docname: string, callback: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + replicate( + target: string | DocumentScope, + options: any, + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/database/compact.html#post--db-_compact + compact(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes + changes(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes + changes(params: DatabaseChangesParams, callback?: Callback): Request; + follow(callback?: Callback): EventEmitter; + follow(params: DocumentScopeFollowUpdatesParams, callback?: Callback): EventEmitter; + // http://docs.couchdb.org/en/latest/api/server/authn.html#cookie-authentication + auth(username: string, userpass: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/server/authn.html#get--_session + session(callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/common.html#post--db + // http://docs.couchdb.org/en/latest/api/document/common.html#put--db-docid + insert(document: ViewDocument | D & MaybeDocument, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/common.html#post--db + // http://docs.couchdb.org/en/latest/api/document/common.html#put--db-docid + insert( + document: ViewDocument | D & MaybeDocument, + params: DocumentInsertParams | string | null, + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid + get(docname: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid + get(docname: string, params?: DocumentGetParams, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#head--db-docid + head(docname: string, callback: Callback): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#copy--db-docid + copy(src_document: string, dst_document: string, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#copy--db-docid copy( src_document: string, dst_document: string, - options: any, - callback?: Callback + options: DocumentCopyOptions, + callback?: Callback ): Request; - destroy(docname: string, rev: string, callback?: Callback): Request; - bulk( - docs: BulkModifyDocsWrapper, - params?: any, - callback?: Callback - ): Request; - list(params?: any, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#delete--db-docid + destroy(docname: string, rev: string, callback?: Callback): Request; + bulk(docs: BulkModifyDocsWrapper, callback?: Callback): Request; + bulk(docs: BulkModifyDocsWrapper, params: any, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#get--db-_all_docs + list(callback?: Callback>): Request; + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#get--db-_all_docs + list(params: DocumentListParams, callback?: Callback>): Request; + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs + fetch(docnames: BulkFetchDocsWrapper, callback?: Callback>): Request; + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs fetch( docnames: BulkFetchDocsWrapper, - params?: any, - callback?: Callback + params: DocumentFetchParams, + callback?: Callback> ): Request; + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs + fetchRevs(docnames: BulkFetchDocsWrapper, callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#post--db-_all_docs fetchRevs( docnames: BulkFetchDocsWrapper, - params?: any, - callback?: Callback + params: DocumentFetchParams, + callback?: Callback ): Request; - multipart: Multipart; + multipart: Multipart; attachment: Attachment; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#get--db-_design-ddoc-_show-func show( designname: string, showname: string, doc_id: string, - params?: any, - callback?: Callback + callback?: Callback ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#get--db-_design-ddoc-_show-func + show( + designname: string, + showname: string, + doc_id: string, + params: any, + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#put--db-_design-ddoc-_update-func-docid atomic( designname: string, updatename: string, docname: string, - body?: any, - callback?: Callback + callback?: Callback ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#put--db-_design-ddoc-_update-func-docid + atomic( + designname: string, + updatename: string, + docname: string, + body: any, + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#put--db-_design-ddoc-_update-func-docid updateWithHandler( designname: string, updatename: string, docname: string, - body?: any, - callback?: Callback + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#put--db-_design-ddoc-_update-func-docid + updateWithHandler( + designname: string, + updatename: string, + docname: string, + body: any, + callback?: Callback ): Request; search( designname: string, searchname: string, - params?: any, - callback?: Callback + callback?: Callback + ): Request; + search( + designname: string, + searchname: string, + params: any, + callback?: Callback ): Request; spatial( ddoc: string, viewname: string, - params?: any, - callback?: Callback + callback?: Callback ): Request; - view( + spatial( + ddoc: string, + viewname: string, + params: any, + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view + // http://docs.couchdb.org/en/latest/api/ddoc/views.html#post--db-_design-ddoc-_view-view + view( designname: string, viewname: string, - params?: any, - callback?: Callback + callback?: Callback> ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view + // http://docs.couchdb.org/en/latest/api/ddoc/views.html#post--db-_design-ddoc-_view-view + view( + designname: string, + viewname: string, + params: DocumentViewParams, + callback?: Callback> + ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#db-design-design-doc-list-list-name-view-name viewWithList( designname: string, viewname: string, listname: string, - params?: any, - callback?: Callback + callback?: Callback + ): Request; + // http://docs.couchdb.org/en/latest/api/ddoc/render.html#db-design-design-doc-list-list-name-view-name + viewWithList( + designname: string, + viewname: string, + listname: string, + params: DocumentViewParams, + callback?: Callback ): Request; server: ServerScope; } - interface Multipart { - insert( - doc: any, - attachments: any[], - params: string | any, - callback?: Callback - ): Request; - get(docname: string, params?: string | any, callback?: Callback): Request; + interface Multipart { + // http://docs.couchdb.org/en/latest/api/document/common.html#creating-multiple-attachments + insert(doc: D, attachments: any[], callback?: Callback): Request; + // http://docs.couchdb.org/en/latest/api/document/common.html#creating-multiple-attachments + insert(doc: D, attachments: any[], params: any, callback?: Callback): Request; + get(docname: string, callback?: Callback): Request; + get(docname: string, params: any, callback?: Callback): Request; } interface Attachment { + insert(docname: string, attname: string, att: null, contenttype: string, params?: any): NodeJS.WritableStream; + insert(docname: string, attname: string, att: any, contenttype: string, callback?: Callback): Request; insert( docname: string, attname: string, att: any, contenttype: string, - params?: any, - callback?: Callback + params: any, + callback?: Callback ): Request; + get(docname: string, attname: string): NodeJS.ReadableStream; + get(docname: string, attname: string, callback?: Callback): Request; get( docname: string, attname: string, - params?: any, - callback?: Callback + params: any, + callback?: Callback ): Request; + destroy(docname: string, attname: string, callback?: Callback): Request; destroy( docname: string, attname: string, - params?: any, - callback?: Callback + params: any, + callback?: Callback ): Request; } @@ -192,7 +306,7 @@ declare namespace nano { type RequestFunction = ( options?: RequestOptions | string, - callback?: Callback + callback?: Callback ) => void; interface RequestOptions { @@ -209,10 +323,12 @@ declare namespace nano { multipart?: any[]; } + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates interface UpdatesParams { feed: "longpoll" | "continuous" | "eventsource"; timeout: number; heartbeat: boolean; + since: string; } interface DocumentScopeFollowUpdatesParams { @@ -243,6 +359,677 @@ declare namespace nano { interface BulkFetchDocsWrapper { keys: string[]; } + + // ------------------------------------- + // Document + // ------------------------------------- + + interface MaybeIdentifiedDocument { + _id?: string; + } + + interface IdentifiedDocument { + _id: string; + } + + interface MaybeRevisionedDocument { + _rev?: string; + } + + interface RevisionedDocument { + _rev: string; + } + + interface MaybeDocument extends MaybeIdentifiedDocument, MaybeRevisionedDocument { + } + + interface Document extends IdentifiedDocument, RevisionedDocument { + } + + // ------------------------------------- + // View + // ------------------------------------- + + interface View { + map?(doc: D & Document): void; + reduce?(doc: D & Document): void; + } + + interface ViewDocument extends IdentifiedDocument { + views: { + [name: string]: View + }; + } + + // ------------------------------------- + // Database scope request and response + // ------------------------------------- + + // http://docs.couchdb.org/en/latest/api/database/common.html#put--db + interface DatabaseCreateResponse { + // Operation status. Available in case of success + ok?: boolean; + + // Error type. Available if response code is 4xx + error?: string; + + // Error description. Available if response code is 4xx + reason?: string; + } + + // http://docs.couchdb.org/en/latest/api/database/common.html#get--db + interface DatabaseGetResponse { + // Set to true if the database compaction routine is operating on this database. + compact_running: boolean; + + // The name of the database. + db_name: string; + + // The version of the physical format used for the data when it is stored on disk. + disk_format_version: number; + + // The number of bytes of live data inside the database file. + data_size: number; + + // The length of the database file on disk. Views indexes are not included in the calculation. + disk_size: number; + + // A count of the documents in the specified database. + doc_count: number; + + // Number of deleted documents + doc_del_count: number; + + // Timestamp of when the database was opened, expressed in microseconds since the epoch. + instance_start_time: string; + + // The number of purge operations on the database. + purge_seq: number; + + sizes: { + // The size of live data inside the database, in bytes. + active: number; + + // The uncompressed size of database contents in bytes. + external: number; + + // The size of the database file on disk in bytes. Views indexes + file: number; + }; + + // The current number of updates to the database. + update_seq: number; + } + + // http://docs.couchdb.org/en/latest/api/database/common.html#delete--db + // http://docs.couchdb.org/en/latest/api/database/compact.html#post--db-_compact + interface OkResponse { + // Operation status + ok: boolean; + } + + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + interface DatabaseReplicateOptions { + // Cancels the replication + cancel?: boolean; + + // Configure the replication to be continuous + continuous?: boolean; + + // Creates the target database. Required administrator’s privileges on target server. + create_target?: boolean; + + // Array of document IDs to be synchronized + doc_ids?: string[]; + + // The name of a filter function. + filter ?: string; + + // Address of a proxy server through which replication should occur (protocol can be “http” or “socks5”) + proxy ?: string; + + // Source database name or URL + source?: string; + + // Target database name or URL + target?: string; + } + + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + interface DatabaseReplicationHistoryItem { + // Number of document write failures + doc_write_failures: number; + + // Number of documents read + docs_read: number; + + // Number of documents written to target + docs_written: number; + + // Last sequence number in changes stream + end_last_seq: number; + + // Date/Time replication operation completed in RFC 2822 format + end_time: string; + + // Number of missing documents checked + missing_checked: number; + + // Number of missing documents found + missing_found: number; + + // Last recorded sequence number + recorded_seq: number; + + // Session ID for this replication operation + session_id: string; + + // First sequence number in changes stream + start_last_seq: number; + + // Date/Time replication operation started in RFC 2822 format + start_time: string; + } + + // http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate + interface DatabaseReplicateResponse { + // Replication history + history: DatabaseReplicationHistoryItem[]; + + // Replication status + ok: boolean; + + // Replication protocol version + replication_id_version: number; + + // Unique session ID + session_id: string; + + // Last sequence number read from source database + source_last_seq: number; + } + + // http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes + interface DatabaseChangesParams { + // List of document IDs to filter the changes feed as valid JSON array. Used with _doc_ids filter. Since length of + // URL is limited, it is better to use POST /{db}/_changes instead. + doc_ids?: string[]; + + // Includes conflicts information in response. Ignored if include_docs isn’t true. Default is false. + conflicts?: boolean; + + // Return the change results in descending sequence order (most recent change first). Default is false. + descending?: boolean; + + // - normal Specifies Normal Polling Mode. All past changes are returned immediately. Default. + // - longpoll Specifies Long Polling Mode. Waits until at least one change has occurred, sends the change, then + // closes the connection. Most commonly used in conjunction with since=now, to wait for the next change. + // - continuous Sets Continuous Mode. Sends a line of JSON per event. Keeps the socket open until timeout. + // - eventsource Sets Event Source Mode. Works the same as Continuous Mode, but sends the events in EventSource + // format. + feed?: "normal" | "longpoll" | "continuous" | "eventsource"; + + // Reference to a filter function from a design document that will filter whole stream emitting only filtered + // events. See the section Change Notifications in the book CouchDB The Definitive Guide for more information. + filter?: string; + + // Period in milliseconds after which an empty line is sent in the results. Only applicable for longpoll, + // continuous, and eventsource feeds. Overrides any timeout to keep the feed alive indefinitely. Default is 60000. + // May be true to use default value. + heartbeat?: number; + + // Include the associated document with each result. If there are conflicts, only the winning revision is returned. + // Default is false. + include_docs?: boolean; + + // Include the Base64-encoded content of attachments in the documents that are included if include_docs is true. + // Ignored if include_docs isn’t true. Default is false. + attachments?: boolean; + + // Include encoding information in attachment stubs if include_docs is true and the particular attachment is + // compressed. Ignored if include_docs isn’t true. Default is false. + att_encoding_info?: boolean; + + // Limit number of result rows to the specified value (note that using 0 here has the same effect as 1). + limit?: number; + + // Start the results from the change immediately after the given update sequence. Can be valid update sequence or + // now value. Default is 0. + since?: number; + + // Specifies how many revisions are returned in the changes array. The default, main_only, will only return the + // current “winning” revision; all_docs will return all leaf revisions (including conflicts and deleted former + // conflicts). + style?: string; + + // Maximum period in milliseconds to wait for a change before the response is sent, even if there are no results. + // Only applicable for longpoll or continuous feeds. Default value is specified by httpd/changes_timeout + // configuration option. Note that 60000 value is also the default maximum timeout to prevent undetected dead + // connections. + timeout?: number; + + // Allows to use view functions as filters. Documents counted as “passed” for view filter in case if map function + // emits at least one record for them. See _view for more info. + view?: string; + } + + // http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes + interface DatabaseChangesResultItem { + // List of document’s leaves with single field rev. + changes: Array<{ rev: string }>; + + // Document ID. + id: string; + + // Update sequence. + seq: any; + + // true if the document is deleted. + deleted: boolean; + } + + // http://docs.couchdb.org/en/latest/api/database/changes.html#get--db-_changes + interface DatabaseChangesResponse { + // Last change update sequence + last_seq: any; + + // Count of remaining items in the feed + pending: number; + + // Changes made to a database + results: DatabaseChangesResultItem[]; + } + + // http://docs.couchdb.org/en/latest/api/server/authn.html#cookie-authentication + interface DatabaseAuthResponse { + // Operation status + ok: boolean; + + // Username + name: string; + + // List of user roles + roles: string[]; + } + + // http://docs.couchdb.org/en/latest/api/server/authn.html#get--_session + interface DatabaseSessionResponse { + // Operation status + ok: boolean; + + // User context for the current user + userCtx: any; + + // Server authentication configuration + info: any; + } + + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates + interface DatabaseUpdatesResultItem { + // Database name. + db_name: string; + + // A database event is one of created, updated, deleted. + type: string; + + // Update sequence of the event. + seq: any; + } + + // http://docs.couchdb.org/en/latest/api/server/common.html#get--_db_updates + interface DatabaseUpdatesResponse { + // An array of database events. For longpoll and continuous modes, the entire response is the contents of the + // results array. + results: DatabaseUpdatesResultItem[]; + + // The last sequence ID reported. + last_seq: string; + } + + // ------------------------------------- + // Document scope request and response + // ------------------------------------- + + interface DocumentResponseRowMeta { + id: string; + key: string; + value: { + rev: string; + }; + } + + interface DocumentResponseRow extends DocumentResponseRowMeta { + doc?: D & Document; + } + + // http://docs.couchdb.org/en/latest/api/database/common.html#post--db + // http://docs.couchdb.org/en/latest/api/document/common.html#put--db-docid + interface DocumentInsertParams { + // Document’s revision if updating an existing document. Alternative to If-Match header or document key. + rev?: string; + + // Stores document in batch mode. + batch?: "ok"; + + // Prevents insertion of a conflicting document. Possible values: true (default) and false. If false, a + // well-formed _rev must be included in the document. new_edits=false is used by the replicator to insert + // documents into the target database even if that leads to the creation of conflicts. + new_edits?: boolean; + } + + // http://docs.couchdb.org/en/latest/api/database/common.html#post--db + // http://docs.couchdb.org/en/latest/api/document/common.html#put--db-docid + interface DocumentInsertResponse { + // Document ID + id: string; + + // Operation status + ok: boolean; + + // Revision MVCC token + rev: string; + } + + // http://docs.couchdb.org/en/latest/api/document/common.html#delete--db-docid + interface DocumentDestroyResponse { + // Document ID + id: string; + + // Operation status + ok: boolean; + + // Revision MVCC token + rev: string; + } + + // http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid + interface DocumentGetParams { + // Includes attachments bodies in response. Default is false. + attachments?: boolean; + + // Includes encoding information in attachment stubs if the particular attachment is compressed. Default is + // false. + att_encoding_info?: boolean; + + // Includes attachments only since specified revisions. Doesn’t includes attachments for specified revisions. + atts_since?: any[]; + + // Includes information about conflicts in document. Default is false. + conflicts?: boolean; + + // Includes information about deleted conflicted revisions. Default is false. + deleted_conflicts?: boolean; + + // Forces retrieving latest “leaf” revision, no matter what rev was requested. Default is false. + latest?: boolean; + + // Includes last update sequence for the document. Default is false. + local_seq?: boolean; + + // Acts same as specifying all conflicts, deleted_conflicts and revs_info query parameters. Default is false. + meta?: boolean; + + // Retrieves documents of specified leaf revisions. Additionally, it accepts value as all to return all leaf + // revisions. + open_revs?: any[]; + + // Retrieves document of specified revision. + rev?: string; + + // Includes list of all known document revisions. + revs?: boolean; + + // Includes detailed information for all known document revisions. Default is false. + revs_info?: boolean; + } + + // http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid + interface DocumentGetResponse { + // Document ID. + _id: string; + + // Revision MVCC token. + _rev: string; + + // Deletion flag. Available if document was removed. + _deleted?: boolean; + + // Attachment’s stubs. Available if document has any attachments. + _attachments?: any; + + // List of conflicted revisions. Available if requested with conflicts=true query parameter. + _conflicts?: any[]; + + // List of deleted conflicted revisions. Available if requested with deleted_conflicts=true query parameter. + _deleted_conflicts?: any[]; + + // Document’s update sequence in current database. Available if requested with local_seq=true query parameter. + _local_seq?: string; + + // List of objects with information about local revisions and their status. Available if requested with + // open_revs query parameter. + _revs_info?: any[]; + + // List of local revision tokens without. Available if requested with revs=true query parameter. + _revisions?: any; + } + + interface DocumentCopyOptions { + overwrite?: boolean; + } + + // http://docs.couchdb.org/en/latest/api/document/common.html#copy--db-docid + interface DocumentCopyResponse { + // Document ID + id: string; + + // Operation status + ok: boolean; + + // Revision MVCC token + rev: string; + } + + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#get--db-_all_docs + interface DocumentListParams { + // Includes conflicts information in response. Ignored if include_docs isn’t true. Default is false. + conflicts?: boolean; + + // Return the documents in descending by key order. Default is false. + descending?: boolean; + + // Stop returning records when the specified key is reached. + end_key?: string; + + // Stop returning records when the specified document ID is reached. + end_key_doc_id?: string; + + // Include the full content of the documents in the return. Default is false. + include_docs?: boolean; + + // Specifies whether the specified end key should be included in the result. Default is true. + inclusive_end?: boolean; + + // Return only documents that match the specified key. + key?: string; + + // Return only documents that match the specified keys. + keys?: string; // This can be string[] too ??? + + // Limit the number of the returned documents to the specified number. + limit?: number; + + // Skip this number of records before starting to return the results. Default is 0. + skip?: number; + + // Allow the results from a stale view to be used, without triggering a rebuild of all views within the + // encompassing design doc. Supported values: ok and update_after. + stale?: string; + + // Return records starting with the specified key. + start_key?: string; + + // Return records starting with the specified document ID. + start_key_doc_id?: string; + + // Response includes an update_seq value indicating which sequence id of the underlying database the view + // reflects. Default is false. + update_seq?: boolean; + } + + // http://docs.couchdb.org/en/latest/api/database/bulk-api.html#get--db-_all_docs + interface DocumentListResponse { + // Offset where the document list started. + offset: number; + + // Array of view row objects. By default the information returned contains only the document ID and revision. + rows: Array>; + + // Number of documents in the database/view. Note that this is not the number of rows returned in the actual + // query. + total_rows: number; + + // Current update sequence for the database. + update_seq?: number; + } + + interface DocumentFetchParams { + conflicts?: boolean; + descending?: boolean; + end_key?: string; + end_key_doc_id?: string; + inclusive_end?: boolean; + key?: string; + keys?: string; // This can be string[] too ??? + limit?: number; + skip?: number; + stale?: string; + start_key?: string; + start_key_doc_id?: string; + update_seq?: boolean; + } + + interface DocumentFetchResponse { + offset: number; + rows: Array>; + total_rows: number; + update_seq?: number; + } + + interface DocumentFetchRevsResponse { + offset: number; + rows: DocumentResponseRowMeta[]; + total_rows: number; + update_seq?: number; + } + + // http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view + interface DocumentViewParams { + // Includes conflicts information in response. Ignored if include_docs isn’t true. Default is false. + conflicts?: boolean; + + // Return the documents in descending by key order. Default is false. + descending?: boolean; + + // Stop returning records when the specified key is reached. + endkey?: any; + + // Alias for endkey param. + end_key?: any; + + // Stop returning records when the specified document ID is reached. Requires endkey to be specified for this + // to have any effect. + endkey_docid?: string; + + // Alias for endkey_docid param. + end_key_doc_id?: string; + + // Group the results using the reduce function to a group or single row. Default is false. + group?: boolean; + + // Specify the group level to be used. + group_level?: number; + + // Include the associated document with each row. Default is false. + include_docs?: boolean; + + // Include the Base64-encoded content of attachments in the documents that are included if include_docs is + // true. Ignored if include_docs isn’t true. Default is false. + attachments?: boolean; + + // Include encoding information in attachment stubs if include_docs is true and the particular attachment is + // compressed. Ignored if include_docs isn’t true. Default is false. + att_encoding_info?: boolean; + + // Specifies whether the specified end key should be included in the result. Default is true. + inclusive_end?: boolean; + + // Return only documents that match the specified key. + key?: any; + + // Return only documents where the key matches one of the keys specified in the array. + keys?: any[]; + + // Limit the number of the returned documents to the specified number. + limit?: number; + + // Use the reduction function. Default is true. + reduce?: boolean; + + // Skip this number of records before starting to return the results. Default is 0. + skip?: number; + + // Sort returned rows. Setting this to false offers a performance boost. The total_rows and offset fields are + // not available when this is set to false. Default is true. + sorted?: boolean; + + // Whether or not the view results should be returned from a stable set of shards. Default is false. + stable?: boolean; + // Allow the results from a stale view to be used. Supported values: ok, update_after and false. ok is + // equivalent to stable=true&update=false. update_after is equivalent to stable=true&update=lazy. false is + // equivalent to stable=false&update=true. + stale?: string; + + // Return records starting with the specified key. + startkey?: any; + + // Alias for startkey param + start_key?: any; + + // Return records starting with the specified document ID. Requires startkey to be specified for this to have + // any effect. + startkey_docid?: string; + + // Alias for startkey_docid param + start_key_doc_id?: string; + + // Whether or not the view in question should be updated prior to responding to the user. Supported values: + // true, false, lazy. Default is true. + update?: string; + + // Response includes an update_seq value indicating which sequence id of the database the view reflects. + // Default is false. + update_seq?: boolean; + } + + // http://docs.couchdb.org/en/latest/api/ddoc/views.html#get--db-_design-ddoc-_view-view + interface DocumentViewResponse { + // Offset where the document list started. + offset: number; + + // Array of view row objects. By default the information returned contains only the document ID and revision. + rows: Array<{ + id: string; + key: string; + value: V; + }>; + + // Number of documents in the database/view. + total_rows: number; + + // Current update sequence for the database + update_seq: any; + } } export = nano; diff --git a/types/nano/nano-tests.ts b/types/nano/nano-tests.ts index 33cfe4534d..7d53b38814 100644 --- a/types/nano/nano-tests.ts +++ b/types/nano/nano-tests.ts @@ -1,6 +1,5 @@ -import * as nano from "nano"; import * as fs from "fs"; -import * as path from "path"; +import * as nano from "nano"; /* * Instantiate with configuration object @@ -67,10 +66,15 @@ db.replicate("a", "b", (error: any) => {}); /* * Document Scope */ -const mydb: nano.DocumentScope = instance.use("mydb"); +interface SomeDocument { + name: string; +} -mydb.insert({ foo: "baz" }, null, (err, response) => {}); -mydb.insert({ foo: "baz" }, "foobar", (error, foo) => {}); +const mydb: nano.DocumentScope = instance.use("mydb"); + +mydb.insert({ name: "baz" }, null, (err, response) => {}); +mydb.insert({ name: "baz" }, "foobar", (error, foo) => {}); +mydb.insert({ name: "baz" }, { new_edits: true }, (error, foo) => {}); mydb.get("foobaz", { revs_info: true }, (error, foobaz) => {}); mydb.head("foobaz", (error, body, headers) => {}); mydb.copy( @@ -123,13 +127,20 @@ mydb.attachment.insert( "text/plain", (error: any, att: any) => {} ); +const attInsert: NodeJS.WritableStream = mydb.attachment.insert( + "new", + "att", + null, + "text/plain" +); mydb.attachment.destroy("new", "att", { rev: "123" }, (err, response) => {}); mydb.attachment.get("new_string", "att", (error: any, helloWorld: any) => {}); +const attGet: NodeJS.ReadableStream = mydb.attachment.get("new_string", "att"); /* * Multipart */ -mydb.multipart.insert({ foo: "baz" }, [{}], "foobaz", (error, foo) => {}); +mydb.multipart.insert({ name: "baz" }, [{}], "foobaz", (error, foo) => {}); mydb.multipart.get("foobaz", (error: any, foobaz: any, headers: any) => {}); /* diff --git a/types/nano/tslint.json b/types/nano/tslint.json index b1439230db..e6dc9b7f2f 100644 --- a/types/nano/tslint.json +++ b/types/nano/tslint.json @@ -2,6 +2,7 @@ "extends": "dtslint/dt.json", "rules": { // TODO - "no-any-union": false + "no-any-union": false, + "no-unnecessary-generics": false } } diff --git a/types/navigation/index.d.ts b/types/navigation/index.d.ts index 6f05956a8a..fdc729f11c 100644 --- a/types/navigation/index.d.ts +++ b/types/navigation/index.d.ts @@ -347,6 +347,10 @@ export class StateContext { * Gets the NavigationData for the last displayed State */ oldData: any; + /** + * Gets the Url for the last displayed State + */ + oldUrl: string; /** * Gets the State of the last Crumb in the crumb trail */ @@ -355,6 +359,10 @@ export class StateContext { * Gets the NavigationData of the last Crumb in the crumb trail */ previousData: any; + /** + * Gets the Url of the last Crumb in the crumb trail + */ + previousUrl: string; /** * Gets the current State */ diff --git a/types/navigation/navigation-tests.ts b/types/navigation/navigation-tests.ts index f710670953..37e597f841 100644 --- a/types/navigation/navigation-tests.ts +++ b/types/navigation/navigation-tests.ts @@ -83,12 +83,14 @@ link = stateNavigator.fluent() // State Context let state: State = stateNavigator.stateContext.state; -const url: string = stateNavigator.stateContext.url; +let url: string = stateNavigator.stateContext.url; const title: string = stateNavigator.stateContext.title; let page: number = stateNavigator.stateContext.data.page; state = stateNavigator.stateContext.oldState; +url = stateNavigator.stateContext.oldUrl; page = stateNavigator.stateContext.oldData.page; state = stateNavigator.stateContext.previousState; +url = stateNavigator.stateContext.previousUrl; page = stateNavigator.stateContext.previousData.page; // Navigation Data diff --git a/types/nedb/tslint.json b/types/nedb/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/nedb/tslint.json +++ b/types/nedb/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/needle/index.d.ts b/types/needle/index.d.ts index 8cc61f2a2f..cc3fa4ff32 100644 --- a/types/needle/index.d.ts +++ b/types/needle/index.d.ts @@ -1,118 +1,327 @@ -// Type definitions for needle 1.4 +// Type definitions for needle 2.0 // Project: https://github.com/tomas/needle -// Definitions by: San Chen , Niklas Mollenhauer +// Definitions by: San Chen , Niklas Mollenhauer , Matanel Sindilevich // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.2 /// -declare module "needle" { - import * as http from 'http'; - import * as Buffer from 'buffer'; - import * as https from 'https'; - namespace Needle { - interface NeedleResponse extends http.IncomingMessage { - body: any; - raw: Buffer; - bytes: number; - } +import * as http from 'http'; +import * as Buffer from 'buffer'; +import * as https from 'https'; - type ReadableStream = NodeJS.ReadableStream; - - type NeedleCallback = (error: Error, response: NeedleResponse, body: any) => void; - - interface Cookies { - [name: string]: any; - } - - type NeedleOptions = RequestOptions & ResponseOptions & RedirectOptions & https.RequestOptions; - - interface RequestOptions { - open_timeout?: number; - read_timeout?: number; - /** - * Alias for open_timeout - */ - timeout?: number; - - follow_max?: number; - /** - * Alias for follow_max - */ - follow?: number; - - multipart?: boolean; - agent?: http.Agent | boolean; - proxy?: string; - headers?: {}; - auth?: "auto" | "digest" | "basic"; - json?: boolean; - - // These properties are overwritten by those in the 'headers' field - cookies?: Cookies; - compressed?: boolean; - // Overwritten if present in the URI - username?: string; - password?: string; - accept?: string; - connection?: string; - user_agent?: string; - } - - interface ResponseOptions { - decode_response?: boolean; - /** - * Alias for decode_response - */ - decode?: boolean; - parse_response?: boolean; - /** - * Alias for parse_response - */ - parse?: boolean; - - parse_cookies?: boolean; - output?: string; - } - - interface RedirectOptions { - follow_set_cookie?: boolean; - follow_set_referer?: boolean; - follow_keep_method?: boolean; - follow_if_same_host?: boolean; - follow_if_same_protocol?: boolean; - } - - interface KeyValue { - [key: string]: any; - } - - type BodyData = Buffer | KeyValue | NodeJS.ReadableStream | string | null; - - interface NeedleStatic { - defaults(options: NeedleOptions): void; - - head(url: string, callback?: NeedleCallback): ReadableStream; - head(url: string, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; - - get(url: string, callback?: NeedleCallback): ReadableStream; - get(url: string, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; - - post(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; - post(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; - - put(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; - put(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; - - patch(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; - patch(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; - - delete(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; - delete(url: string, data: BodyData, options?: NeedleOptions, callback ?: NeedleCallback): ReadableStream; - - request(method: string, url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; - request(method: string, url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; - } +declare namespace core { + interface NeedleResponse extends http.IncomingMessage { + body: any; + raw: Buffer; + bytes: number; } - const needle: Needle.NeedleStatic; - export = needle; + + type ReadableStream = NodeJS.ReadableStream; + + type NeedleCallback = (error: Error, response: NeedleResponse, body: any) => void; + + interface Cookies { + [name: string]: any; + } + + type NeedleOptions = RequestOptions & ResponseOptions & RedirectOptions & https.RequestOptions; + + type NeedleReadonlyHttpVerbs = 'get' | 'head'; + + type NeedleReadWriteHttpVerbs = 'delete' | 'patch' | 'post' | 'put'; + + type NeedleHttpVerbs = NeedleReadonlyHttpVerbs | NeedleReadWriteHttpVerbs; + + interface RequestOptions { + /** + * Returns error if connection takes longer than X milisecs to establish. + * Defaults to 10000 (10 secs). 0 means no timeout. + */ + open_timeout?: number; + /** + * Alias for open_timeout + */ + timeout?: number; + + /** + * Returns error if data transfer takes longer than X milisecs, + * after connection is established. Defaults to 0 (no timeout). + */ + read_timeout?: number; + /** + * Number of redirects to follow. Defaults to 0. + */ + follow_max?: number; + /** + * Alias for follow_max + */ + follow?: number; + + /** + * Enables multipart/form-data encoding. Defaults to false. + * Use it when uploading files. + */ + multipart?: boolean; + /** + * Uses an http.Agent of your choice, instead of the global, default one. + * Useful for tweaking the behaviour at the connection level, such as when doing tunneling. + */ + agent?: http.Agent | boolean; + /** + * Forwards request through HTTP(s) proxy. + * Eg. proxy: 'http://user:pass@proxy.server.com:3128'. + * For more advanced proxying/tunneling use a custom agent. + */ + proxy?: string; + /** + * Object containing custom HTTP headers for request. + */ + headers?: {}; + /** + * Determines what to do with provided username/password. + * Options are auto, digest or basic (default). + * auto will detect the type of authentication depending on the response headers. + */ + auth?: "auto" | "digest" | "basic"; + /** + * When true, sets content type to application/json and sends request body as JSON string, + * instead of a query string. + */ + json?: boolean; + /** + * When sending streams, this lets manually set the Content-Length header + * --if the stream's bytecount is known beforehand--, + * preventing ECONNRESET (socket hang up) errors on some servers that misbehave + * when receiving payloads of unknown size. + * Set it to 0 and Needle will get and set the stream's length, + * or leave unset for the default behavior, + * which is no Content-Length header for stream payloads. + */ + stream_length?: number; + + // These properties are overwritten by those in the 'headers' field + /** + * Builds and sets a Cookie header from a { key: 'value' } object. + */ + cookies?: Cookies; + /** + * If true, sets 'Accept-Encoding' header to 'gzip,deflate', + * and inflates content if zipped. + * Defaults to false. + */ + compressed?: boolean; + // Overwritten if present in the URI + /** + * For HTTP basic auth. + */ + username?: string; + /** + * For HTTP basic auth. Requires username to be passed, but is optional. + */ + password?: string; + /** + * Sets 'Accept' HTTP header. Defaults to */*. + */ + accept?: string; + /** + * Sets 'Connection' HTTP header. + * Not set by default, unless running Node < 0.11.4 + * in which case it defaults to close. + */ + connection?: string; + /** + * Sets the 'User-Agent' HTTP header. + * Defaults to Needle/{version} (Node.js {node_version}). + */ + user_agent?: string; + /** + * Sets the 'Content-Type' header. + * Unset by default, unless you're sending data + * in which case it's set accordingly to whatever is being sent + * (application/x-www-form-urlencoded, application/json or multipart/form-data). + * That is, of course, unless the option is passed, + * either here or through options.headers. + */ + content_type?: string; + } + + interface ResponseOptions { + /** + * Whether to decode the text responses to UTF-8, + * if Content-Type header shows a different charset. Defaults to true. + */ + decode_response?: boolean; + /** + * Alias for decode_response + */ + decode?: boolean; + + /** + * Whether to parse XML or JSON response bodies automagically. + * Defaults to true. + * You can also set this to 'xml' or 'json' in which case Needle + * will only parse the response if the content type matches. + */ + parse_response?: boolean; + /** + * Alias for parse_response + */ + parse?: boolean; + + /** + * Whether to parse response’s Set-Cookie header. + * Defaults to true. + * If parsed, response cookies will be available at resp.cookies. + */ + parse_cookies?: boolean; + /** + * Dump response output to file. + * This occurs after parsing and charset decoding is done. + */ + output?: string; + } + + interface RedirectOptions { + /** + * Sends the cookies received in the set-cookie header + * as part of the following request. + * false by default. + */ + follow_set_cookie?: boolean; + /** + * Sets the 'Referer' header to the requested URI + * when following a redirect. + * false by default. + */ + follow_set_referer?: boolean; + /** + * If enabled, resends the request using the original verb + * instead of being rewritten to get with no data. + * false by default. + */ + follow_keep_method?: boolean; + /** + * When true, Needle will only follow redirects that point to the same host + * as the original request. + * false by default. + */ + follow_if_same_host?: boolean; + /** + * When true, Needle will only follow redirects that point to the same protocol + * as the original request. + * false by default. + */ + follow_if_same_protocol?: boolean; + } + + interface KeyValue { + [key: string]: any; + } + + type BodyData = Buffer | KeyValue | NodeJS.ReadableStream | string | null; } + +/** + * Calling needle() directly returns a Promise. + * + * Since needle 2.0 + * @param method Designates an HTTP verb for the request. + */ +declare function needle(method: core.NeedleReadonlyHttpVerbs, url: string, options?: core.NeedleOptions): Promise; +/** + * Calling needle() directly returns a Promise. + * + * Since needle 2.0 + * @param method Designates an HTTP verb for the request. + * @param data May be null when issuing an HTTP DELETE request, but you need to explicity pass it. + */ +declare function needle(method: core.NeedleHttpVerbs, url: string, data: core.BodyData, options?: core.NeedleOptions): Promise; + +declare namespace needle { + type BodyData = core.BodyData; + type NeedleCallback = core.NeedleCallback; + type NeedleHttpVerbs = core.NeedleHttpVerbs; + export type NeedleOptions = core.NeedleOptions; + type ReadableStream = core.ReadableStream; + + /** + * Lets override the defaults for all future requests. + */ + export function defaults(options: NeedleOptions): NeedleOptions; + + /** + * Issues an HTTP HEAD request. + */ + export function head(url: string, callback?: NeedleCallback): ReadableStream; + /** + * Issues an HTTP HEAD request. + */ + export function head(url: string, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + /** + * Issues an HTTP GET request. + */ + export function get(url: string, callback?: NeedleCallback): ReadableStream; + /** + * Issues an HTTP GET request. + */ + export function get(url: string, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + /** + * Issues an HTTP POST request. + */ + export function post(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + /** + * Issues an HTTP POST request. + */ + export function post(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + /** + * Issues an HTTP PUT request. + */ + export function put(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + /** + * Issues an HTTP PUT request. + */ + export function put(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + /** + * Same behaviour as PUT. + */ + export function patch(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + /** + * Same behaviour as PUT. + */ + export function patch(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + /** + * Issues an HTTP DELETE request. + */ + function deleteFunc(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + /** + * Issues an HTTP DELETE request. + */ + function deleteFunc(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + // See https://github.com/Microsoft/TypeScript/issues/1784#issuecomment-258720219 + export { deleteFunc as delete }; + + /** + * Generic request. + * This not only allows for flexibility, but also lets you perform a GET request with data, + * in which case will be appended to the request as a query string, + * unless you pass a json: true option. + * @param method Designates an HTTP verb for the request. + */ + export function request(method: NeedleHttpVerbs, url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + /** + * Generic request. + * This not only allows for flexibility, but also lets you perform a GET request with data, + * in which case will be appended to the request as a query string, + * unless you pass a json: true option. + * @param method Designates an HTTP verb for the request. + */ + export function request(method: NeedleHttpVerbs, url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; +} + +export = needle; diff --git a/types/needle/needle-tests.ts b/types/needle/needle-tests.ts index 1c5090027a..e8f2efee20 100644 --- a/types/needle/needle-tests.ts +++ b/types/needle/needle-tests.ts @@ -2,24 +2,37 @@ import * as needle from "needle"; import * as fs from "fs"; function Usage() { + // using promises + needle('get', 'http://ifconfig.me/all.json') + .then((resp) => console.log(resp.body.ip_addr)); + // using callback - needle.get('http://ifconfig.me/all.json', function (error, response) { + needle.get('http://ifconfig.me/all.json', (error, response) => { if (!error) console.log(response.body.ip_addr); // JSON decoding magic. :) }); // using streams - var out: any; // = fs.createWriteStream('logo.png'); + const out = fs.createWriteStream('file.txt'); needle.get('https://google.com/images/logo.png').pipe(out); } function ResponsePipeline() { - needle.get('http://stackoverflow.com/feeds', { compressed: true }, function (err, resp) { + // using promises + needle('get', 'http://stackoverflow.com/feeds', { compressed: true }) + .then((resp) => { + console.log(resp.body); // this little guy won't be a Gzipped binary blob + // but a nice object containing all the latest entries + }); + + // using callback + needle.get('http://stackoverflow.com/feeds', { compressed: true }, (err, resp) => { console.log(resp.body); // this little guy won't be a Gzipped binary blob // but a nice object containing all the latest entries }); - var options = { + // using streams + const options = { compressed: true, follow: 5, rejectUnauthorized: true @@ -27,54 +40,69 @@ function ResponsePipeline() { // in this case, we'll ask Needle to follow redirects (disabled by default), // but also to verify their SSL certificates when connecting. - var stream = needle.get('https://backend.server.com/everything.html', options); + const stream = needle.get('https://backend.server.com/everything.html', options); - stream.on('readable', function () { - var data: any; + stream.on('readable', () => { + let data: any; while (data = stream.read()) { console.log(data.toString()); } }); - stream.on('end', function(err: any) { + stream.on('end', (err: any) => { // if our request had an error, our 'end' event will tell us. if (!err) console.log('Great success!'); - }) + }); } function API_head() { - var options = { - open_timeout: 5000 // if we don't get a response in 5 seconds, boom. - }; + // using promises + needle('head', 'https://my.backend.server.com') + .then((resp) => console.log('Yup, still alive.')) + .catch((err: Error) => console.log('Shoot! Something is wrong: ' + err.message)); - needle.head('https://my.backend.server.com', function (err, resp) { + // using callback + needle.head('https://my.backend.server.com', (err, resp) => { if (err) { console.log('Shoot! Something is wrong: ' + err.message); - } - else { + } else { console.log('Yup, still alive.'); } }); } function API_get() { - needle.get('google.com/search?q=syd+barrett', function (err, resp) { + // using promises + needle('get', 'google.com/search?q=syd+barrett') + .then((resp) => { + // if no http:// is found, Needle will automagically prepend it. + }); + + // using callback + needle.get('google.com/search?q=syd+barrett', (err, resp) => { // if no http:// is found, Needle will automagically prepend it. }); } function API_post() { - var options = { + const options = { headers: { 'X-Custom-Header': 'Bumbaway atuna' } }; - needle.post('https://my.app.com/endpoint', 'foo=bar', options, function (err, resp) { + // using promises + needle('post', 'https://my.app.com/endpoint', 'foo=bar', options) + .then((resp) => { + // you can pass params as a string or as an object. + }); + + // using callback + needle.post('https://my.app.com/endpoint', 'foo=bar', options, (err, resp) => { // you can pass params as a string or as an object. }); } function API_put() { - var nested = { + const nested = { params: { are: { also: 'supported' @@ -82,87 +110,155 @@ function API_put() { } }; - needle.put('https://api.app.com/v2', nested, function (err, resp) { - console.log('Got ' + resp.bytes + ' bytes.') // another nice treat from this handsome fella. + // using promises + needle('put', 'https://api.app.com/v2', nested) + .then((resp) => { + console.log(`Got ${resp.bytes} bytes.`); // another nice treat from this handsome fella. + }); + + // using callback + needle.put('https://api.app.com/v2', nested, (err, resp) => { + console.log(`Got ${resp.bytes} bytes.`); // another nice treat from this handsome fella. }); } function API_delete() { - var options = { + const options = { username: 'fidelio', password: 'x' }; - needle.delete('https://api.app.com/messages/123', null, options, function (err, resp) { + // using promises + needle('delete', 'https://api.app.com/messages/123', null, options) + .then((resp) => { + // in this case, data may be null, but you need to explicity pass it. + }); + + // using callback + needle.delete('https://api.app.com/messages/123', null, options, (err, resp) => { // in this case, data may be null, but you need to explicity pass it. }); } function API_request() { - var params = { + const params = { q: 'a very smart query', page: 2, }; - needle.request('get', 'forum.com/search', params, function (err, resp) { - if (!err && resp.statusCode == 200) + // using promises + needle('get', 'forum.com/search', params) + .then((resp) => { + if (resp.statusCode === 200) + console.log(resp.body); // here you go, mister. + }); + + needle('get', 'forum.com/search', params, { json: true }) + .then((resp) => { + if (resp.statusCode === 200) console.log('It worked!'); + }); + + // using callback + needle.request('get', 'forum.com/search', params, (err, resp) => { + if (!err && resp.statusCode === 200) console.log(resp.body); // here you go, mister. }); - needle.request('get', 'forum.com/search', params, { json: true }, function(err, resp) { - if (resp.statusCode == 200) console.log('It worked!'); + needle.request('get', 'forum.com/search', params, { json: true }, (err, resp) => { + if (resp.statusCode === 200) console.log('It worked!'); }); } function HttpGetWithBasicAuth() { - needle.get('https://api.server.com', { username: 'you', password: 'secret' }, function(err, resp) { + // using promises + needle('get', 'https://api.server.com', { username: 'you', password: 'secret' }) + .then((resp) => { + // used HTTP auth + }); + needle('get', 'https://username:password@api.server.com') + .then((resp) => { + // used HTTP auth from URL + }); + + // using callback + needle.get('https://api.server.com', { username: 'you', password: 'secret' }, (err, resp) => { // used HTTP auth }); - needle.get('https://username:password@api.server.com', function(err, resp) { + needle.get('https://username:password@api.server.com', (err, resp) => { // used HTTP auth from URL }); } function DigestAuth() { - needle.get('other.server.com', { username: 'you', password: 'secret', auth: 'digest' }, function(err, resp, body) { + // using promises + needle('get', 'other.server.com', { username: 'you', password: 'secret', auth: 'digest' }) + .then((resp) => { + // needle prepends 'http://' to your URL, if missing + }); + + // using callback + needle.get('other.server.com', { username: 'you', password: 'secret', auth: 'digest' }, (err, resp, body) => { // needle prepends 'http://' to your URL, if missing }); } function CustomAcceptHeaderDeflate() { - var options = { + const options: needle.NeedleOptions = { compressed: true, follow: 10, accept: 'application/vnd.github.full+json' - } + }; - needle.get('api.github.com/users/tomas', options, function(err, resp, body) { + // using promises + needle('get', 'api.github.com/users/tomas', options) + .then((resp) => { + // body will contain a JSON.parse(d) object + // if parsing fails, you'll simply get the original body + }); + + // using callback + needle.get('api.github.com/users/tomas', options, (err, resp, body) => { // body will contain a JSON.parse(d) object // if parsing fails, you'll simply get the original body }); - } function Various() { + // using promises + needle('get', 'https://news.ycombinator.com/rss') + .then((resp) => { + // if xml2js is installed, you'll get a nice object containing the nodes in the RSS + }); + needle('get', 'http://upload.server.com/tux.png', { output: '/tmp/tux.png' }) + .then((resp) => { + // you can dump any response to a file, not only binaries. + }); + needle('get', 'http://search.npmjs.org', { proxy: 'http://localhost:1234' }) + .then((resp) => { + // request passed through proxy + }); - needle.get('https://news.ycombinator.com/rss', function(err, resp, body) { + // using callback + needle.get('https://news.ycombinator.com/rss', (err, resp, body) => { // if xml2js is installed, you'll get a nice object containing the nodes in the RSS }); - needle.get('http://upload.server.com/tux.png', { output: '/tmp/tux.png' }, function(err, resp, body) { + needle.get('http://upload.server.com/tux.png', { output: '/tmp/tux.png' }, (err, resp, body) => { // you can dump any response to a file, not only binaries. }); - needle.get('http://search.npmjs.org', { proxy: 'http://localhost:1234' }, function(err, resp, body) { + needle.get('http://search.npmjs.org', { proxy: 'http://localhost:1234' }, (err, resp, body) => { // request passed through proxy }); + + // using streams const stream1 = needle.get('http://www.as35662.net/100.log'); - stream1.on('readable', function() { + stream1.on('readable', () => { let chunk: any; while (chunk = stream1.read()) { console.log('got data: ', chunk); } }); const stream2 = needle.get('http://jsonplaceholder.typicode.com/db', { parse: true }); - stream2.on('readable', function() { + stream2.on('readable', () => { let node: any; // our stream2 will only emit a single JSON root node. @@ -170,43 +266,54 @@ function Various() { console.log('got data: ', node); } }); - - /* - // Sample omitted, no JSONStream - needle.get('http://jsonplaceholder.typicode.com/db', { parse: true }) - .pipe(new JSONStream.parse('posts.*.title')) - .on('data', function (obj) { - console.log('got post title: %s', obj); - }); - */ } function FileUpload() { - var data = { + const data = { foo: 'bar', image: { file: '/home/tomas/linux.png', content_type: 'image/png' } }; - needle.post('http://my.other.app.com', data, { multipart: true }, function(err, resp, body) { + // using promises + needle('post', 'http://my.other.app.com', data, { multipart: true }) + .then((resp) => { + // needle will read the file and include it in the form-data as binary + }); + needle('put', 'https://api.app.com/v2', fs.createReadStream('myfile.txt')) + .then((resp) => { + // stream content is uploaded verbatim + }); + + // using callback + needle.post('http://my.other.app.com', data, { multipart: true }, (err, resp, body) => { // needle will read the file and include it in the form-data as binary }); - needle.put('https://api.app.com/v2', fs.createReadStream('myfile.txt'), function(err, resp, body) { + needle.put('https://api.app.com/v2', fs.createReadStream('myfile.txt'), (err, resp, body) => { // stream content is uploaded verbatim }); } function Multipart() { - var buffer = fs.readFileSync('/path/to/package.zip'); + const buffer = fs.readFileSync('/path/to/package.zip'); - var data = { + const data = { zip_file: { - buffer: buffer, + buffer, filename: 'mypackage.zip', content_type: 'application/octet-stream' } - } + }; - needle.post('http://somewhere.com/over/the/rainbow', data, { multipart: true }, function(err, resp, body) { + // using promises + needle('post', 'http://somewhere.com/over/the/rainbow', data, { multipart: true }) + .then((resp) => { + // if you see, when using buffers we need to pass the filename for the multipart body. + // you can also pass a filename when using the file path method, in case you want to override + // the default filename to be received on the other end. + }); + + // using callback + needle.post('http://somewhere.com/over/the/rainbow', data, { multipart: true }, (err, resp, body) => { // if you see, when using buffers we need to pass the filename for the multipart body. // you can also pass a filename when using the file path method, in case you want to override // the default filename to be received on the other end. @@ -214,15 +321,23 @@ function Multipart() { } function MultipartContentType() { - var data = { + const data = { token: 'verysecret', payload: { value: JSON.stringify({ title: 'test', version: 1 }), content_type: 'application/json' } - } + }; - needle.post('http://test.com/', data, { timeout: 5000, multipart: true }, function(err, resp, body) { + // using promises + needle('post', 'http://test.com/', data, { timeout: 5000, multipart: true }) + .then((resp) => { + // in this case, if the request takes more than 5 seconds + // the callback will return a [Socket closed] error + }); + + // using callback + needle.post('http://test.com/', data, { timeout: 5000, multipart: true }, (err, resp, body) => { // in this case, if the request takes more than 5 seconds // the callback will return a [Socket closed] error }); diff --git a/types/needle/tslint.json b/types/needle/tslint.json new file mode 100644 index 0000000000..70429c253f --- /dev/null +++ b/types/needle/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "no-conditional-assignment": false, + "strict-export-declare-modifiers": false + } +} \ No newline at end of file diff --git a/types/needle/v1/index.d.ts b/types/needle/v1/index.d.ts new file mode 100644 index 0000000000..8cc61f2a2f --- /dev/null +++ b/types/needle/v1/index.d.ts @@ -0,0 +1,118 @@ +// Type definitions for needle 1.4 +// Project: https://github.com/tomas/needle +// Definitions by: San Chen , Niklas Mollenhauer +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "needle" { + import * as http from 'http'; + import * as Buffer from 'buffer'; + import * as https from 'https'; + namespace Needle { + interface NeedleResponse extends http.IncomingMessage { + body: any; + raw: Buffer; + bytes: number; + } + + type ReadableStream = NodeJS.ReadableStream; + + type NeedleCallback = (error: Error, response: NeedleResponse, body: any) => void; + + interface Cookies { + [name: string]: any; + } + + type NeedleOptions = RequestOptions & ResponseOptions & RedirectOptions & https.RequestOptions; + + interface RequestOptions { + open_timeout?: number; + read_timeout?: number; + /** + * Alias for open_timeout + */ + timeout?: number; + + follow_max?: number; + /** + * Alias for follow_max + */ + follow?: number; + + multipart?: boolean; + agent?: http.Agent | boolean; + proxy?: string; + headers?: {}; + auth?: "auto" | "digest" | "basic"; + json?: boolean; + + // These properties are overwritten by those in the 'headers' field + cookies?: Cookies; + compressed?: boolean; + // Overwritten if present in the URI + username?: string; + password?: string; + accept?: string; + connection?: string; + user_agent?: string; + } + + interface ResponseOptions { + decode_response?: boolean; + /** + * Alias for decode_response + */ + decode?: boolean; + parse_response?: boolean; + /** + * Alias for parse_response + */ + parse?: boolean; + + parse_cookies?: boolean; + output?: string; + } + + interface RedirectOptions { + follow_set_cookie?: boolean; + follow_set_referer?: boolean; + follow_keep_method?: boolean; + follow_if_same_host?: boolean; + follow_if_same_protocol?: boolean; + } + + interface KeyValue { + [key: string]: any; + } + + type BodyData = Buffer | KeyValue | NodeJS.ReadableStream | string | null; + + interface NeedleStatic { + defaults(options: NeedleOptions): void; + + head(url: string, callback?: NeedleCallback): ReadableStream; + head(url: string, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + get(url: string, callback?: NeedleCallback): ReadableStream; + get(url: string, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + post(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + post(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + put(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + put(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + patch(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + patch(url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + + delete(url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + delete(url: string, data: BodyData, options?: NeedleOptions, callback ?: NeedleCallback): ReadableStream; + + request(method: string, url: string, data: BodyData, callback?: NeedleCallback): ReadableStream; + request(method: string, url: string, data: BodyData, options?: NeedleOptions, callback?: NeedleCallback): ReadableStream; + } + } + const needle: Needle.NeedleStatic; + export = needle; +} diff --git a/types/needle/v1/needle-tests.ts b/types/needle/v1/needle-tests.ts new file mode 100644 index 0000000000..1c5090027a --- /dev/null +++ b/types/needle/v1/needle-tests.ts @@ -0,0 +1,229 @@ +import * as needle from "needle"; +import * as fs from "fs"; + +function Usage() { + // using callback + needle.get('http://ifconfig.me/all.json', function (error, response) { + if (!error) + console.log(response.body.ip_addr); // JSON decoding magic. :) + }); + + // using streams + var out: any; // = fs.createWriteStream('logo.png'); + needle.get('https://google.com/images/logo.png').pipe(out); +} + +function ResponsePipeline() { + needle.get('http://stackoverflow.com/feeds', { compressed: true }, function (err, resp) { + console.log(resp.body); // this little guy won't be a Gzipped binary blob + // but a nice object containing all the latest entries + }); + + var options = { + compressed: true, + follow: 5, + rejectUnauthorized: true + }; + + // in this case, we'll ask Needle to follow redirects (disabled by default), + // but also to verify their SSL certificates when connecting. + var stream = needle.get('https://backend.server.com/everything.html', options); + + stream.on('readable', function () { + var data: any; + while (data = stream.read()) { + console.log(data.toString()); + } + }); + + stream.on('end', function(err: any) { + // if our request had an error, our 'end' event will tell us. + if (!err) console.log('Great success!'); + }) +} + +function API_head() { + var options = { + open_timeout: 5000 // if we don't get a response in 5 seconds, boom. + }; + + needle.head('https://my.backend.server.com', function (err, resp) { + if (err) { + console.log('Shoot! Something is wrong: ' + err.message); + } + else { + console.log('Yup, still alive.'); + } + }); +} + +function API_get() { + needle.get('google.com/search?q=syd+barrett', function (err, resp) { + // if no http:// is found, Needle will automagically prepend it. + }); +} + +function API_post() { + var options = { + headers: { 'X-Custom-Header': 'Bumbaway atuna' } + }; + + needle.post('https://my.app.com/endpoint', 'foo=bar', options, function (err, resp) { + // you can pass params as a string or as an object. + }); +} + +function API_put() { + var nested = { + params: { + are: { + also: 'supported' + } + } + }; + + needle.put('https://api.app.com/v2', nested, function (err, resp) { + console.log('Got ' + resp.bytes + ' bytes.') // another nice treat from this handsome fella. + }); +} + +function API_delete() { + var options = { + username: 'fidelio', + password: 'x' + }; + + needle.delete('https://api.app.com/messages/123', null, options, function (err, resp) { + // in this case, data may be null, but you need to explicity pass it. + }); +} + +function API_request() { + var params = { + q: 'a very smart query', + page: 2, + }; + + needle.request('get', 'forum.com/search', params, function (err, resp) { + if (!err && resp.statusCode == 200) + console.log(resp.body); // here you go, mister. + }); + + needle.request('get', 'forum.com/search', params, { json: true }, function(err, resp) { + if (resp.statusCode == 200) console.log('It worked!'); + }); +} + +function HttpGetWithBasicAuth() { + needle.get('https://api.server.com', { username: 'you', password: 'secret' }, function(err, resp) { + // used HTTP auth + }); + needle.get('https://username:password@api.server.com', function(err, resp) { + // used HTTP auth from URL + }); +} + +function DigestAuth() { + needle.get('other.server.com', { username: 'you', password: 'secret', auth: 'digest' }, function(err, resp, body) { + // needle prepends 'http://' to your URL, if missing + }); +} + +function CustomAcceptHeaderDeflate() { + var options = { + compressed: true, + follow: 10, + accept: 'application/vnd.github.full+json' + } + + needle.get('api.github.com/users/tomas', options, function(err, resp, body) { + // body will contain a JSON.parse(d) object + // if parsing fails, you'll simply get the original body + }); + +} + +function Various() { + + needle.get('https://news.ycombinator.com/rss', function(err, resp, body) { + // if xml2js is installed, you'll get a nice object containing the nodes in the RSS + }); + needle.get('http://upload.server.com/tux.png', { output: '/tmp/tux.png' }, function(err, resp, body) { + // you can dump any response to a file, not only binaries. + }); + needle.get('http://search.npmjs.org', { proxy: 'http://localhost:1234' }, function(err, resp, body) { + // request passed through proxy + }); + const stream1 = needle.get('http://www.as35662.net/100.log'); + stream1.on('readable', function() { + let chunk: any; + while (chunk = stream1.read()) { + console.log('got data: ', chunk); + } + }); + const stream2 = needle.get('http://jsonplaceholder.typicode.com/db', { parse: true }); + stream2.on('readable', function() { + let node: any; + + // our stream2 will only emit a single JSON root node. + while (node = stream2.read()) { + console.log('got data: ', node); + } + }); + + /* + // Sample omitted, no JSONStream + needle.get('http://jsonplaceholder.typicode.com/db', { parse: true }) + .pipe(new JSONStream.parse('posts.*.title')) + .on('data', function (obj) { + console.log('got post title: %s', obj); + }); + */ +} + +function FileUpload() { + var data = { + foo: 'bar', + image: { file: '/home/tomas/linux.png', content_type: 'image/png' } + }; + + needle.post('http://my.other.app.com', data, { multipart: true }, function(err, resp, body) { + // needle will read the file and include it in the form-data as binary + }); + needle.put('https://api.app.com/v2', fs.createReadStream('myfile.txt'), function(err, resp, body) { + // stream content is uploaded verbatim + }); +} + +function Multipart() { + var buffer = fs.readFileSync('/path/to/package.zip'); + + var data = { + zip_file: { + buffer: buffer, + filename: 'mypackage.zip', + content_type: 'application/octet-stream' + } + } + + needle.post('http://somewhere.com/over/the/rainbow', data, { multipart: true }, function(err, resp, body) { + // if you see, when using buffers we need to pass the filename for the multipart body. + // you can also pass a filename when using the file path method, in case you want to override + // the default filename to be received on the other end. + }); +} + +function MultipartContentType() { + var data = { + token: 'verysecret', + payload: { + value: JSON.stringify({ title: 'test', version: 1 }), + content_type: 'application/json' + } + } + + needle.post('http://test.com/', data, { timeout: 5000, multipart: true }, function(err, resp, body) { + // in this case, if the request takes more than 5 seconds + // the callback will return a [Socket closed] error + }); +} diff --git a/types/needle/v1/tsconfig.json b/types/needle/v1/tsconfig.json new file mode 100644 index 0000000000..f6b8b1e810 --- /dev/null +++ b/types/needle/v1/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "needle": ["needle/v1"] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "needle-tests.ts" + ] +} diff --git a/types/nes/index.d.ts b/types/nes/index.d.ts index aab6827ed7..c5526049de 100644 --- a/types/nes/index.d.ts +++ b/types/nes/index.d.ts @@ -91,7 +91,7 @@ declare module nes { id: string; app: Object; auth: nes.SocketAuthObject; - disconect(callback?: () => void): void; + disconnect(callback?: () => void): void; send(message: any, callback?: (err?: any) => void): void; publish(path: string, message: any, callback?: (err?: any) => void): void; revoke(path: string, message: any, callback?: (err?: any) => void): void; diff --git a/types/nes/test/socket.ts b/types/nes/test/socket.ts new file mode 100644 index 0000000000..7f7617d462 --- /dev/null +++ b/types/nes/test/socket.ts @@ -0,0 +1,16 @@ +// from https://github.com/hapijs/nes/blob/v6.4.3/lib/socket.js + +import Nes = require('nes'); + +const socket: Nes.Socket = undefined; + +const cb = () => { }; +socket.disconnect(cb); +const s: string = socket.id; +const o: Object = socket.app; +const auth: Nes.SocketAuthObject = socket.auth; + +const cb2 = (err?: any) => { }; +socket.send('message', (err?: any) => { }); +socket.publish('path', 'message', cb2); +socket.revoke('path', 'message', cb2); diff --git a/types/nes/tsconfig.json b/types/nes/tsconfig.json index cb28129b71..c03d7c22ee 100644 --- a/types/nes/tsconfig.json +++ b/types/nes/tsconfig.json @@ -26,9 +26,10 @@ "test/route-authentication-server.ts", "test/route-invocation-client.ts", "test/route-invocation-server.ts", + "test/socket.ts", "test/subscription-filter-client.ts", "test/subscription-filter-server.ts", "test/subscriptions-client.ts", "test/subscriptions-server.ts" ] -} \ No newline at end of file +} diff --git a/types/next-redux-wrapper/tslint.json b/types/next-redux-wrapper/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/next-redux-wrapper/tslint.json +++ b/types/next-redux-wrapper/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/ngstorage/tslint.json b/types/ngstorage/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/ngstorage/tslint.json +++ b/types/ngstorage/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/nightmare/index.d.ts b/types/nightmare/index.d.ts index 1af05002d3..d40ffbd58c 100644 --- a/types/nightmare/index.d.ts +++ b/types/nightmare/index.d.ts @@ -5,7 +5,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 - +/// declare class Nightmare { constructor(options?: Nightmare.IConstructorOptions); @@ -95,7 +95,10 @@ declare class Nightmare { removeListener(event: 'prompt', cb: (msg: string, defaultValue?: string) => void): Nightmare; removeListener(event: 'error', cb: (msg: string, trace?: Nightmare.IStackTrace[]) => void): Nightmare; removeListener(event: 'timeout', cb: (msg: string) => void): Nightmare; - screenshot(path: string): Nightmare; + screenshot(done?: (err: any, buffer: Buffer) => void): Nightmare; + screenshot(path: string, done?: (err: any) => void): Nightmare; + screenshot(clip: { x: number, y: number, width: number, height: number }, done?: (err: any, buffer: Buffer) => void): Nightmare; + screenshot(path: string, clip?: { x: number, y: number, width: number, height: number }, done?: (err: any) => void): Nightmare; html(path: string, saveType: string): Nightmare; html(path: string, saveType: 'HTMLOnly'): Nightmare; html(path: string, saveType: 'HTMLComplete'): Nightmare; @@ -134,6 +137,9 @@ declare namespace Nightmare { cookiesFile?: string; phantomPath?: string; show?: boolean; + typeInterval?: number; + x?: number; + y?: number; } export interface IRequest { diff --git a/types/nightmare/nightmare-tests.ts b/types/nightmare/nightmare-tests.ts index 921e961538..434964bb20 100644 --- a/types/nightmare/nightmare-tests.ts +++ b/types/nightmare/nightmare-tests.ts @@ -1,9 +1,7 @@ - /// import Nightmare = require("nightmare"); - new Nightmare() .goto('http://yahoo.com') .type('input[title="Search"]', 'github nightmare') @@ -167,6 +165,25 @@ new Nightmare() .screenshot('test/test.png') .run(done); +new Nightmare() + .goto('http://yahoo.com') + .screenshot((err, buffer) => { + console.log(Buffer.isBuffer(buffer)); + }) + .run(done); + +new Nightmare() + .goto('http://yahoo.com') + .screenshot('test/test.png', { x: 10, y: 5, width: 10, height: 10}) + .run(done); + +new Nightmare() + .goto('http://yahoo.com') + .screenshot({ x: 10, y: 5, width: 10, height: 10}, (err, buffer) => { + console.log(Buffer.isBuffer(buffer)); + }) + .run(done); + new Nightmare() .goto('http://yahoo.com') .pdf('test/test.pdf') diff --git a/types/node-rsa/tslint.json b/types/node-rsa/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/node-rsa/tslint.json +++ b/types/node-rsa/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/node/index.d.ts b/types/node/index.d.ts index 9c222b5350..79f75145e8 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -23,6 +23,9 @@ * * ************************************************/ +/** inspector module types */ +/// + // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build interface Console { Console: NodeJS.ConsoleConstructor; @@ -78,10 +81,18 @@ declare var __filename: string; declare var __dirname: string; declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; +declare namespace setTimeout { + export function __promisify__(ms: number): Promise; + export function __promisify__(ms: number, value: T): Promise; +} declare function clearTimeout(timeoutId: NodeJS.Timer): void; declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; declare function clearInterval(intervalId: NodeJS.Timer): void; declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; +declare namespace setImmediate { + export function __promisify__(): Promise; + export function __promisify__(value: T): Promise; +} declare function clearImmediate(immediateId: any): void; // TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version. @@ -93,10 +104,17 @@ interface NodeRequireFunction { interface NodeRequire extends NodeRequireFunction { resolve(id: string): string; cache: any; - extensions: any; + extensions: NodeExtensions; main: NodeModule | undefined; } +interface NodeExtensions { + '.js': (m: NodeModule, filename: string) => any; + '.json': (m: NodeModule, filename: string) => any; + '.node': (m: NodeModule, filename: string) => any; + [ext: string]: (m: NodeModule, filename: string) => any; +} + declare var require: NodeRequire; interface NodeModule { @@ -1632,6 +1650,9 @@ declare module "repl" { export interface REPLServer extends readline.ReadLine { context: any; + inputStream: NodeJS.ReadableStream; + outputStream: NodeJS.WritableStream; + defineCommand(keyword: string, cmd: Function | { help: string, action: Function }): void; displayPrompt(preserveCursor?: boolean): void; @@ -1667,6 +1688,12 @@ declare module "repl" { } export function start(options?: string | ReplOptions): REPLServer; + + export class Recoverable extends SyntaxError { + err: Error; + + constructor(err: Error); + } } declare module "readline" { @@ -4208,7 +4235,7 @@ declare module "fs" { */ export function createWriteStream(path: PathLike, options?: string | { flags?: string; - defaultEncoding?: string; + encoding?: string; fd?: number; mode?: number; autoClose?: boolean; @@ -5592,6 +5619,26 @@ declare module "constants" { export var ALPN_ENABLED: number; } +declare module "module" { + class Module implements NodeModule { + static runMain(): void; + static wrap(code: string): string; + + exports: any; + require: NodeRequireFunction; + id: string; + filename: string; + loaded: boolean; + parent: NodeModule | null; + children: NodeModule[]; + paths: string[]; + + constructor(id: string, parent?: Module); + } + + export = Module; +} + declare module "process" { export = process; } @@ -5627,10 +5674,18 @@ declare module "v8" { declare module "timers" { export function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; + export namespace setTimeout { + export function __promisify__(ms: number): Promise; + export function __promisify__(ms: number, value: T): Promise; + } export function clearTimeout(timeoutId: NodeJS.Timer): void; export function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timer; export function clearInterval(intervalId: NodeJS.Timer): void; export function setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; + export namespace setImmediate { + export function __promisify__(): Promise; + export function __promisify__(value: T): Promise; + } export function clearImmediate(immediateId: any): void; } diff --git a/types/node/inspector.d.ts b/types/node/inspector.d.ts new file mode 100644 index 0000000000..445f55410d --- /dev/null +++ b/types/node/inspector.d.ts @@ -0,0 +1,2479 @@ +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module "inspector" { + import { EventEmitter } from 'events'; + + export interface InspectorNotification { + method: string; + params: T; + } + + export namespace Schema { + /** + * Description of the protocol domain. + */ + export interface Domain { + /** + * Domain name. + */ + name: string; + /** + * Domain version. + */ + version: string; + } + + export interface GetDomainsReturnType { + /** + * List of supported domains. + */ + domains: Schema.Domain[]; + } + } + + export namespace Runtime { + /** + * Unique script identifier. + */ + export type ScriptId = string; + + /** + * Unique object identifier. + */ + export type RemoteObjectId = string; + + /** + * Primitive value which cannot be JSON-stringified. + */ + export type UnserializableValue = string; + + /** + * Mirror object referencing original JavaScript object. + */ + export interface RemoteObject { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + /** + * Object class (constructor) name. Specified for object type values only. + */ + className?: string; + /** + * Remote object value in case of primitive values or JSON values (if it was requested). + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified does not have value, but gets this property. + */ + unserializableValue?: Runtime.UnserializableValue; + /** + * String representation of the object. + */ + description?: string; + /** + * Unique object identifier (for non-primitive values). + */ + objectId?: Runtime.RemoteObjectId; + /** + * Preview containing abbreviated property values. Specified for object type values only. + * @experimental + */ + preview?: Runtime.ObjectPreview; + /** + * @experimental + */ + customPreview?: Runtime.CustomPreview; + } + + /** + * @experimental + */ + export interface CustomPreview { + header: string; + hasBody: boolean; + formatterObjectId: Runtime.RemoteObjectId; + bindRemoteObjectFunctionId: Runtime.RemoteObjectId; + configObjectId?: Runtime.RemoteObjectId; + } + + /** + * Object containing abbreviated remote object value. + * @experimental + */ + export interface ObjectPreview { + /** + * Object type. + */ + type: string; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + /** + * String representation of the object. + */ + description?: string; + /** + * True iff some of the properties or entries of the original object did not fit. + */ + overflow: boolean; + /** + * List of the properties. + */ + properties: Runtime.PropertyPreview[]; + /** + * List of the entries. Specified for map and set subtype values only. + */ + entries?: Runtime.EntryPreview[]; + } + + /** + * @experimental + */ + export interface PropertyPreview { + /** + * Property name. + */ + name: string; + /** + * Object type. Accessor means that the property itself is an accessor property. + */ + type: string; + /** + * User-friendly property value string. + */ + value?: string; + /** + * Nested value preview. + */ + valuePreview?: Runtime.ObjectPreview; + /** + * Object subtype hint. Specified for object type values only. + */ + subtype?: string; + } + + /** + * @experimental + */ + export interface EntryPreview { + /** + * Preview of the key. Specified for map-like collection entries. + */ + key?: Runtime.ObjectPreview; + /** + * Preview of the value. + */ + value: Runtime.ObjectPreview; + } + + /** + * Object property descriptor. + */ + export interface PropertyDescriptor { + /** + * Property name or symbol description. + */ + name: string; + /** + * The value associated with the property. + */ + value?: Runtime.RemoteObject; + /** + * True if the value associated with the property may be changed (data descriptors only). + */ + writable?: boolean; + /** + * A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). + */ + get?: Runtime.RemoteObject; + /** + * A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). + */ + set?: Runtime.RemoteObject; + /** + * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. + */ + configurable: boolean; + /** + * True if this property shows up during enumeration of the properties on the corresponding object. + */ + enumerable: boolean; + /** + * True if the result was thrown during the evaluation. + */ + wasThrown?: boolean; + /** + * True if the property is owned for the object. + */ + isOwn?: boolean; + /** + * Property symbol object, if the property is of the symbol type. + */ + symbol?: Runtime.RemoteObject; + } + + /** + * Object internal property descriptor. This property isn't normally visible in JavaScript code. + */ + export interface InternalPropertyDescriptor { + /** + * Conventional property name. + */ + name: string; + /** + * The value associated with the property. + */ + value?: Runtime.RemoteObject; + } + + /** + * Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified. + */ + export interface CallArgument { + /** + * Primitive value. + */ + value?: any; + /** + * Primitive value which can not be JSON-stringified. + */ + unserializableValue?: Runtime.UnserializableValue; + /** + * Remote object handle. + */ + objectId?: Runtime.RemoteObjectId; + } + + /** + * Id of an execution context. + */ + export type ExecutionContextId = number; + + /** + * Description of an isolated world. + */ + export interface ExecutionContextDescription { + /** + * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. + */ + id: Runtime.ExecutionContextId; + /** + * Execution context origin. + */ + origin: string; + /** + * Human readable name describing given context. + */ + name: string; + /** + * Embedder-specific auxiliary data. + */ + auxData?: {}; + } + + /** + * Detailed information about exception (or error) that was thrown during script compilation or execution. + */ + export interface ExceptionDetails { + /** + * Exception id. + */ + exceptionId: number; + /** + * Exception text, which should be used together with exception object when available. + */ + text: string; + /** + * Line number of the exception location (0-based). + */ + lineNumber: number; + /** + * Column number of the exception location (0-based). + */ + columnNumber: number; + /** + * Script ID of the exception location. + */ + scriptId?: Runtime.ScriptId; + /** + * URL of the exception location, to be used when the script was not reported. + */ + url?: string; + /** + * JavaScript stack trace if available. + */ + stackTrace?: Runtime.StackTrace; + /** + * Exception object if available. + */ + exception?: Runtime.RemoteObject; + /** + * Identifier of the context where exception happened. + */ + executionContextId?: Runtime.ExecutionContextId; + } + + /** + * Number of milliseconds since epoch. + */ + export type Timestamp = number; + + /** + * Stack entry for runtime errors and assertions. + */ + export interface CallFrame { + /** + * JavaScript function name. + */ + functionName: string; + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * JavaScript script line number (0-based). + */ + lineNumber: number; + /** + * JavaScript script column number (0-based). + */ + columnNumber: number; + } + + /** + * Call frames for assertions or error messages. + */ + export interface StackTrace { + /** + * String label of this stack trace. For async traces this may be a name of the function that initiated the async call. + */ + description?: string; + /** + * JavaScript function name. + */ + callFrames: Runtime.CallFrame[]; + /** + * Asynchronous JavaScript stack trace that preceded this stack, if available. + */ + parent?: Runtime.StackTrace; + /** + * Creation frame of the Promise which produced the next synchronous trace when resolved, if available. + * @experimental + */ + promiseCreationFrame?: Runtime.CallFrame; + } + + export interface EvaluateParameterType { + /** + * Expression to evaluate. + */ + expression: string; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + contextId?: Runtime.ExecutionContextId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + * @experimental + */ + userGesture?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface AwaitPromiseParameterType { + /** + * Identifier of the promise. + */ + promiseObjectId: Runtime.RemoteObjectId; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + } + + export interface CallFunctionOnParameterType { + /** + * Identifier of the object to call function on. + */ + objectId: Runtime.RemoteObjectId; + /** + * Declaration of the function to call. + */ + functionDeclaration: string; + /** + * Call arguments. All call arguments must belong to the same JavaScript world as the target object. + */ + arguments?: Runtime.CallArgument[]; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether execution should be treated as initiated by user in the UI. + * @experimental + */ + userGesture?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface GetPropertiesParameterType { + /** + * Identifier of the object to return properties for. + */ + objectId: Runtime.RemoteObjectId; + /** + * If true, returns properties belonging only to the element itself, not to its prototype chain. + */ + ownProperties?: boolean; + /** + * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. + * @experimental + */ + accessorPropertiesOnly?: boolean; + /** + * Whether preview should be generated for the results. + * @experimental + */ + generatePreview?: boolean; + } + + export interface ReleaseObjectParameterType { + /** + * Identifier of the object to release. + */ + objectId: Runtime.RemoteObjectId; + } + + export interface ReleaseObjectGroupParameterType { + /** + * Symbolic object group name. + */ + objectGroup: string; + } + + export interface SetCustomObjectFormatterEnabledParameterType { + enabled: boolean; + } + + export interface CompileScriptParameterType { + /** + * Expression to compile. + */ + expression: string; + /** + * Source url to be set for the script. + */ + sourceURL: string; + /** + * Specifies whether the compiled script should be persisted. + */ + persistScript: boolean; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: Runtime.ExecutionContextId; + } + + export interface RunScriptParameterType { + /** + * Id of the script to run. + */ + scriptId: Runtime.ScriptId; + /** + * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. + */ + executionContextId?: Runtime.ExecutionContextId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Determines whether Command Line API should be available during the evaluation. + */ + includeCommandLineAPI?: boolean; + /** + * Whether the result is expected to be a JSON object which should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + */ + generatePreview?: boolean; + /** + * Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. + */ + awaitPromise?: boolean; + } + + export interface EvaluateReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface AwaitPromiseReturnType { + /** + * Promise result. Will contain rejected value if promise was rejected. + */ + result: Runtime.RemoteObject; + /** + * Exception details if stack strace is available. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface CallFunctionOnReturnType { + /** + * Call result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface GetPropertiesReturnType { + /** + * Object properties. + */ + result: Runtime.PropertyDescriptor[]; + /** + * Internal object properties (only of the element itself). + */ + internalProperties?: Runtime.InternalPropertyDescriptor[]; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface CompileScriptReturnType { + /** + * Id of the script. + */ + scriptId?: Runtime.ScriptId; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface RunScriptReturnType { + /** + * Run result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface ExecutionContextCreatedEventDataType { + /** + * A newly created execution context. + */ + context: Runtime.ExecutionContextDescription; + } + + export interface ExecutionContextDestroyedEventDataType { + /** + * Id of the destroyed context + */ + executionContextId: Runtime.ExecutionContextId; + } + + export interface ExceptionThrownEventDataType { + /** + * Timestamp of the exception. + */ + timestamp: Runtime.Timestamp; + exceptionDetails: Runtime.ExceptionDetails; + } + + export interface ExceptionRevokedEventDataType { + /** + * Reason describing why exception was revoked. + */ + reason: string; + /** + * The id of revoked exception, as reported in exceptionUnhandled. + */ + exceptionId: number; + } + + export interface ConsoleAPICalledEventDataType { + /** + * Type of the call. + */ + type: string; + /** + * Call arguments. + */ + args: Runtime.RemoteObject[]; + /** + * Identifier of the context where the call was made. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Call timestamp. + */ + timestamp: Runtime.Timestamp; + /** + * Stack trace captured when the call was made. + */ + stackTrace?: Runtime.StackTrace; + } + + export interface InspectRequestedEventDataType { + object: Runtime.RemoteObject; + hints: {}; + } + } + + export namespace Debugger { + /** + * Breakpoint identifier. + */ + export type BreakpointId = string; + + /** + * Call frame identifier. + */ + export type CallFrameId = string; + + /** + * Location in the source code. + */ + export interface Location { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + } + + /** + * Location in the source code. + * @experimental + */ + export interface ScriptPosition { + lineNumber: number; + columnNumber: number; + } + + /** + * JavaScript call frame. Array of call frames form the call stack. + */ + export interface CallFrame { + /** + * Call frame identifier. This identifier is only valid while the virtual machine is paused. + */ + callFrameId: Debugger.CallFrameId; + /** + * Name of the JavaScript function called on this call frame. + */ + functionName: string; + /** + * Location in the source code. + * @experimental + */ + functionLocation?: Debugger.Location; + /** + * Location in the source code. + */ + location: Debugger.Location; + /** + * Scope chain for this call frame. + */ + scopeChain: Debugger.Scope[]; + /** + * this object for this call frame. + */ + this: Runtime.RemoteObject; + /** + * The value being returned, if the function is at return point. + */ + returnValue?: Runtime.RemoteObject; + } + + /** + * Scope description. + */ + export interface Scope { + /** + * Scope type. + */ + type: string; + /** + * Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. + */ + object: Runtime.RemoteObject; + name?: string; + /** + * Location in the source code where scope starts + */ + startLocation?: Debugger.Location; + /** + * Location in the source code where scope ends + */ + endLocation?: Debugger.Location; + } + + /** + * Search match for resource. + * @experimental + */ + export interface SearchMatch { + /** + * Line number in resource content. + */ + lineNumber: number; + /** + * Line with match content. + */ + lineContent: string; + } + + /** + * @experimental + */ + export interface BreakLocation { + /** + * Script identifier as reported in the Debugger.scriptParsed. + */ + scriptId: Runtime.ScriptId; + /** + * Line number in the script (0-based). + */ + lineNumber: number; + /** + * Column number in the script (0-based). + */ + columnNumber?: number; + type?: string; + } + + export interface SetBreakpointsActiveParameterType { + /** + * New value for breakpoints active state. + */ + active: boolean; + } + + export interface SetSkipAllPausesParameterType { + /** + * New value for skip pauses state. + */ + skip: boolean; + } + + export interface SetBreakpointByUrlParameterType { + /** + * Line number to set breakpoint at. + */ + lineNumber: number; + /** + * URL of the resources to set breakpoint on. + */ + url?: string; + /** + * Regex pattern for the URLs of the resources to set breakpoints on. Either url or urlRegex must be specified. + */ + urlRegex?: string; + /** + * Offset in the line to set breakpoint at. + */ + columnNumber?: number; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + export interface SetBreakpointParameterType { + /** + * Location to set breakpoint in. + */ + location: Debugger.Location; + /** + * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. + */ + condition?: string; + } + + export interface RemoveBreakpointParameterType { + breakpointId: Debugger.BreakpointId; + } + + export interface GetPossibleBreakpointsParameterType { + /** + * Start of range to search possible breakpoint locations in. + */ + start: Debugger.Location; + /** + * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. + */ + end?: Debugger.Location; + /** + * Only consider locations which are in the same (non-nested) function as start. + */ + restrictToFunction?: boolean; + } + + export interface ContinueToLocationParameterType { + /** + * Location to continue to. + */ + location: Debugger.Location; + /** + * @experimental + */ + targetCallFrames?: string; + } + + export interface SearchInContentParameterType { + /** + * Id of the script to search in. + */ + scriptId: Runtime.ScriptId; + /** + * String to search for. + */ + query: string; + /** + * If true, search is case sensitive. + */ + caseSensitive?: boolean; + /** + * If true, treats string parameter as regex. + */ + isRegex?: boolean; + } + + export interface SetScriptSourceParameterType { + /** + * Id of the script to edit. + */ + scriptId: Runtime.ScriptId; + /** + * New content of the script. + */ + scriptSource: string; + /** + * If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. + */ + dryRun?: boolean; + } + + export interface RestartFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: Debugger.CallFrameId; + } + + export interface GetScriptSourceParameterType { + /** + * Id of the script to get source for. + */ + scriptId: Runtime.ScriptId; + } + + export interface SetPauseOnExceptionsParameterType { + /** + * Pause on exceptions mode. + */ + state: string; + } + + export interface EvaluateOnCallFrameParameterType { + /** + * Call frame identifier to evaluate on. + */ + callFrameId: Debugger.CallFrameId; + /** + * Expression to evaluate. + */ + expression: string; + /** + * String object group name to put result into (allows rapid releasing resulting object handles using releaseObjectGroup). + */ + objectGroup?: string; + /** + * Specifies whether command line API should be available to the evaluated expression, defaults to false. + */ + includeCommandLineAPI?: boolean; + /** + * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. + */ + silent?: boolean; + /** + * Whether the result is expected to be a JSON object that should be sent by value. + */ + returnByValue?: boolean; + /** + * Whether preview should be generated for the result. + * @experimental + */ + generatePreview?: boolean; + /** + * Whether to throw an exception if side effect cannot be ruled out during evaluation. + * @experimental + */ + throwOnSideEffect?: boolean; + } + + export interface SetVariableValueParameterType { + /** + * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. + */ + scopeNumber: number; + /** + * Variable name. + */ + variableName: string; + /** + * New variable value. + */ + newValue: Runtime.CallArgument; + /** + * Id of callframe that holds variable. + */ + callFrameId: Debugger.CallFrameId; + } + + export interface SetAsyncCallStackDepthParameterType { + /** + * Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default). + */ + maxDepth: number; + } + + export interface SetBlackboxPatternsParameterType { + /** + * Array of regexps that will be used to check script url for blackbox state. + */ + patterns: string[]; + } + + export interface SetBlackboxedRangesParameterType { + /** + * Id of the script. + */ + scriptId: Runtime.ScriptId; + positions: Debugger.ScriptPosition[]; + } + + export interface SetBreakpointByUrlReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: Debugger.BreakpointId; + /** + * List of the locations this breakpoint resolved into upon addition. + */ + locations: Debugger.Location[]; + } + + export interface SetBreakpointReturnType { + /** + * Id of the created breakpoint for further reference. + */ + breakpointId: Debugger.BreakpointId; + /** + * Location this breakpoint resolved into. + */ + actualLocation: Debugger.Location; + } + + export interface GetPossibleBreakpointsReturnType { + /** + * List of the possible breakpoint locations. + */ + locations: Debugger.BreakLocation[]; + } + + export interface SearchInContentReturnType { + /** + * List of search matches. + */ + result: Debugger.SearchMatch[]; + } + + export interface SetScriptSourceReturnType { + /** + * New stack trace in case editing has happened while VM was stopped. + */ + callFrames?: Debugger.CallFrame[]; + /** + * Whether current call stack was modified after applying the changes. + */ + stackChanged?: boolean; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + /** + * Exception details if any. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface RestartFrameReturnType { + /** + * New stack trace. + */ + callFrames: Debugger.CallFrame[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + } + + export interface GetScriptSourceReturnType { + /** + * Script source. + */ + scriptSource: string; + } + + export interface EvaluateOnCallFrameReturnType { + /** + * Object wrapper for the evaluation result. + */ + result: Runtime.RemoteObject; + /** + * Exception details. + */ + exceptionDetails?: Runtime.ExceptionDetails; + } + + export interface ScriptParsedEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * True, if this script is generated as a result of the live edit operation. + * @experimental + */ + isLiveEdit?: boolean; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + * @experimental + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + * @experimental + */ + isModule?: boolean; + /** + * This script length. + * @experimental + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + export interface ScriptFailedToParseEventDataType { + /** + * Identifier of the script parsed. + */ + scriptId: Runtime.ScriptId; + /** + * URL or name of the script parsed (if any). + */ + url: string; + /** + * Line offset of the script within the resource with given URL (for script tags). + */ + startLine: number; + /** + * Column offset of the script within the resource with given URL. + */ + startColumn: number; + /** + * Last line of the script. + */ + endLine: number; + /** + * Length of the last line of the script. + */ + endColumn: number; + /** + * Specifies script creation context. + */ + executionContextId: Runtime.ExecutionContextId; + /** + * Content hash of the script. + */ + hash: string; + /** + * Embedder-specific auxiliary data. + */ + executionContextAuxData?: {}; + /** + * URL of source map associated with script (if any). + */ + sourceMapURL?: string; + /** + * True, if this script has sourceURL. + * @experimental + */ + hasSourceURL?: boolean; + /** + * True, if this script is ES6 module. + * @experimental + */ + isModule?: boolean; + /** + * This script length. + * @experimental + */ + length?: number; + /** + * JavaScript top stack frame of where the script parsed event was triggered if available. + * @experimental + */ + stackTrace?: Runtime.StackTrace; + } + + export interface BreakpointResolvedEventDataType { + /** + * Breakpoint unique identifier. + */ + breakpointId: Debugger.BreakpointId; + /** + * Actual breakpoint location. + */ + location: Debugger.Location; + } + + export interface PausedEventDataType { + /** + * Call stack the virtual machine stopped on. + */ + callFrames: Debugger.CallFrame[]; + /** + * Pause reason. + */ + reason: string; + /** + * Object containing break-specific auxiliary properties. + */ + data?: {}; + /** + * Hit breakpoints IDs + */ + hitBreakpoints?: string[]; + /** + * Async stack trace, if any. + */ + asyncStackTrace?: Runtime.StackTrace; + } + } + + export namespace Console { + /** + * Console message. + */ + export interface ConsoleMessage { + /** + * Message source. + */ + source: string; + /** + * Message severity. + */ + level: string; + /** + * Message text. + */ + text: string; + /** + * URL of the message origin. + */ + url?: string; + /** + * Line number in the resource that generated this message (1-based). + */ + line?: number; + /** + * Column number in the resource that generated this message (1-based). + */ + column?: number; + } + + export interface MessageAddedEventDataType { + /** + * Console message that has been added. + */ + message: Console.ConsoleMessage; + } + } + + export namespace Profiler { + /** + * Profile node. Holds callsite information, execution statistics and child nodes. + */ + export interface ProfileNode { + /** + * Unique id of the node. + */ + id: number; + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Number of samples where this node was on top of the call stack. + * @experimental + */ + hitCount?: number; + /** + * Child node ids. + */ + children?: number[]; + /** + * The reason of being not optimized. The function may be deoptimized or marked as don't optimize. + */ + deoptReason?: string; + /** + * An array of source position ticks. + * @experimental + */ + positionTicks?: Profiler.PositionTickInfo[]; + } + + /** + * Profile. + */ + export interface Profile { + /** + * The list of profile nodes. First item is the root node. + */ + nodes: Profiler.ProfileNode[]; + /** + * Profiling start timestamp in microseconds. + */ + startTime: number; + /** + * Profiling end timestamp in microseconds. + */ + endTime: number; + /** + * Ids of samples top nodes. + */ + samples?: number[]; + /** + * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. + */ + timeDeltas?: number[]; + } + + /** + * Specifies a number of samples attributed to a certain source position. + * @experimental + */ + export interface PositionTickInfo { + /** + * Source line number (1-based). + */ + line: number; + /** + * Number of samples attributed to the source line. + */ + ticks: number; + } + + /** + * Coverage data for a source range. + * @experimental + */ + export interface CoverageRange { + /** + * JavaScript script source offset for the range start. + */ + startOffset: number; + /** + * JavaScript script source offset for the range end. + */ + endOffset: number; + /** + * Collected execution count of the source range. + */ + count: number; + } + + /** + * Coverage data for a JavaScript function. + * @experimental + */ + export interface FunctionCoverage { + /** + * JavaScript function name. + */ + functionName: string; + /** + * Source ranges inside the function with coverage data. + */ + ranges: Profiler.CoverageRange[]; + } + + /** + * Coverage data for a JavaScript script. + * @experimental + */ + export interface ScriptCoverage { + /** + * JavaScript script id. + */ + scriptId: Runtime.ScriptId; + /** + * JavaScript script name or url. + */ + url: string; + /** + * Functions contained in the script that has coverage data. + */ + functions: Profiler.FunctionCoverage[]; + } + + export interface SetSamplingIntervalParameterType { + /** + * New sampling interval in microseconds. + */ + interval: number; + } + + export interface StartPreciseCoverageParameterType { + /** + * Collect accurate call counts beyond simple 'covered' or 'not covered'. + */ + callCount?: boolean; + } + + export interface StopReturnType { + /** + * Recorded profile. + */ + profile: Profiler.Profile; + } + + export interface TakePreciseCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: Profiler.ScriptCoverage[]; + } + + export interface GetBestEffortCoverageReturnType { + /** + * Coverage data for the current isolate. + */ + result: Profiler.ScriptCoverage[]; + } + + export interface ConsoleProfileStartedEventDataType { + id: string; + /** + * Location of console.profile(). + */ + location: Debugger.Location; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + + export interface ConsoleProfileFinishedEventDataType { + id: string; + /** + * Location of console.profileEnd(). + */ + location: Debugger.Location; + profile: Profiler.Profile; + /** + * Profile title passed as an argument to console.profile(). + */ + title?: string; + } + } + + export namespace HeapProfiler { + /** + * Heap snapshot object id. + */ + export type HeapSnapshotObjectId = string; + + /** + * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes. + */ + export interface SamplingHeapProfileNode { + /** + * Function location. + */ + callFrame: Runtime.CallFrame; + /** + * Allocations size in bytes for the node excluding children. + */ + selfSize: number; + /** + * Child nodes. + */ + children: HeapProfiler.SamplingHeapProfileNode[]; + } + + /** + * Profile. + */ + export interface SamplingHeapProfile { + head: HeapProfiler.SamplingHeapProfileNode; + } + + export interface StartTrackingHeapObjectsParameterType { + trackAllocations?: boolean; + } + + export interface StopTrackingHeapObjectsParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. + */ + reportProgress?: boolean; + } + + export interface TakeHeapSnapshotParameterType { + /** + * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. + */ + reportProgress?: boolean; + } + + export interface GetObjectByHeapObjectIdParameterType { + objectId: HeapProfiler.HeapSnapshotObjectId; + /** + * Symbolic group name that can be used to release multiple objects. + */ + objectGroup?: string; + } + + export interface AddInspectedHeapObjectParameterType { + /** + * Heap snapshot object id to be accessible by means of $x command line API. + */ + heapObjectId: HeapProfiler.HeapSnapshotObjectId; + } + + export interface GetHeapObjectIdParameterType { + /** + * Identifier of the object to get heap object id for. + */ + objectId: Runtime.RemoteObjectId; + } + + export interface StartSamplingParameterType { + /** + * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. + */ + samplingInterval?: number; + } + + export interface GetObjectByHeapObjectIdReturnType { + /** + * Evaluation result. + */ + result: Runtime.RemoteObject; + } + + export interface GetHeapObjectIdReturnType { + /** + * Id of the heap snapshot object corresponding to the passed remote object id. + */ + heapSnapshotObjectId: HeapProfiler.HeapSnapshotObjectId; + } + + export interface StopSamplingReturnType { + /** + * Recorded sampling heap profile. + */ + profile: HeapProfiler.SamplingHeapProfile; + } + + export interface AddHeapSnapshotChunkEventDataType { + chunk: string; + } + + export interface ReportHeapSnapshotProgressEventDataType { + done: number; + total: number; + finished?: boolean; + } + + export interface LastSeenObjectIdEventDataType { + lastSeenObjectId: number; + timestamp: number; + } + + export interface HeapStatsUpdateEventDataType { + /** + * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. + */ + statsUpdate: number[]; + } + } + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + /** + * Returns supported domains. + */ + post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void; + /** + * Evaluates expression on global object. + */ + post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void; + + /** + * Add handler to promise with given promise object id. + */ + post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void; + + /** + * Calls function with given declaration on the given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void; + + /** + * Returns properties of a given object. Object group of the result is inherited from the target object. + */ + post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void; + + /** + * Releases remote object with given id. + */ + post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void; + + /** + * Releases all remote objects that belong to a given group. + */ + post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void; + + /** + * Tells inspected instance to run if it was waiting for debugger to attach. + */ + post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void; + + /** + * Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context. + */ + post(method: "Runtime.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables reporting of execution contexts creation. + */ + post(method: "Runtime.disable", callback?: (err: Error | null) => void): void; + + /** + * Discards collected exceptions and console API calls. + */ + post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void; + + /** + * @experimental + */ + post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void; + post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void; + + /** + * Compiles expression. + */ + post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void; + + /** + * Runs script with given id in a given context. + */ + post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void; + /** + * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. + */ + post(method: "Debugger.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables debugger for given page. + */ + post(method: "Debugger.disable", callback?: (err: Error | null) => void): void; + + /** + * Activates / deactivates all breakpoints on the page. + */ + post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void; + + /** + * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). + */ + post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void; + + /** + * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in locations property. Further matching script parsing will result in subsequent breakpointResolved events issued. This logical breakpoint will survive page reloads. + */ + post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void; + + /** + * Sets JavaScript breakpoint at a given location. + */ + post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void; + + /** + * Removes JavaScript breakpoint. + */ + post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void; + + /** + * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. + * @experimental + */ + post(method: "Debugger.getPossibleBreakpoints", params?: Debugger.GetPossibleBreakpointsParameterType, callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void; + + /** + * Continues execution until specific location is reached. + */ + post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void; + + /** + * Steps over the statement. + */ + post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void; + + /** + * Steps into the function call. + */ + post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void; + + /** + * Steps out of the function call. + */ + post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void; + + /** + * Stops on the next JavaScript statement. + */ + post(method: "Debugger.pause", callback?: (err: Error | null) => void): void; + + /** + * Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called. + * @experimental + */ + post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void; + + /** + * Resumes JavaScript execution. + */ + post(method: "Debugger.resume", callback?: (err: Error | null) => void): void; + + /** + * Searches for given string in script content. + * @experimental + */ + post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void; + + /** + * Edits JavaScript source live. + */ + post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void; + + /** + * Restarts particular call frame from the beginning. + */ + post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void; + + /** + * Returns source for the script with given id. + */ + post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void; + + /** + * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is none. + */ + post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void; + + /** + * Evaluates expression on a given call frame. + */ + post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void; + + /** + * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. + */ + post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void; + + /** + * Enables or disables async call stacks tracking. + */ + post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void; + + /** + * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. + * @experimental + */ + post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void; + + /** + * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. + * @experimental + */ + post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void; + post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void; + /** + * Enables console domain, sends the messages collected so far to the client by means of the messageAdded notification. + */ + post(method: "Console.enable", callback?: (err: Error | null) => void): void; + + /** + * Disables console domain, prevents further console messages from being reported to the client. + */ + post(method: "Console.disable", callback?: (err: Error | null) => void): void; + + /** + * Does nothing. + */ + post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void; + post(method: "Profiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.disable", callback?: (err: Error | null) => void): void; + + /** + * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. + */ + post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.start", callback?: (err: Error | null) => void): void; + + post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void; + + /** + * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. + * @experimental + */ + post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void; + post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. + * @experimental + */ + post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void; + + /** + * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. + * @experimental + */ + post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void; + + /** + * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. + * @experimental + */ + post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void; + post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getObjectByHeapObjectId", params?: HeapProfiler.GetObjectByHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void; + + /** + * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). + */ + post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void; + + post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void; + post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void; + + post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void; + + // Events + + addListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + addListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + addListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + addListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + addListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + emit(event: string | symbol, ...args: any[]): boolean; + emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean; + emit(event: "Runtime.executionContextCreated", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification): boolean; + emit(event: "Runtime.executionContextsCleared"): boolean; + emit(event: "Runtime.exceptionThrown", message: InspectorNotification): boolean; + emit(event: "Runtime.exceptionRevoked", message: InspectorNotification): boolean; + emit(event: "Runtime.consoleAPICalled", message: InspectorNotification): boolean; + emit(event: "Runtime.inspectRequested", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptParsed", message: InspectorNotification): boolean; + emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification): boolean; + emit(event: "Debugger.breakpointResolved", message: InspectorNotification): boolean; + emit(event: "Debugger.paused", message: InspectorNotification): boolean; + emit(event: "Debugger.resumed"): boolean; + emit(event: "Console.messageAdded", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification): boolean; + emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.resetProfiles"): boolean; + emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification): boolean; + emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification): boolean; + + on(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + on(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + on(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + on(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + on(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + on(event: "HeapProfiler.resetProfiles", listener: () => void): this; + on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + once(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + once(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + once(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + once(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + once(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + once(event: "HeapProfiler.resetProfiles", listener: () => void): this; + once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + prependListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: string, listener: (...args: any[]) => void): this; + + /** + * Emitted when any notification from the V8 Inspector is received. + */ + prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this; + + /** + * Issued when new execution context is created. + */ + prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when execution context is destroyed. + */ + prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when all executionContexts were cleared in browser + */ + prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this; + + /** + * Issued when exception was thrown and unhandled. + */ + prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when unhandled exception was revoked. + */ + prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when console API was called. + */ + prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification) => void): this; + + /** + * Issued when object should be inspected (for example, as a result of inspect() command line API call). + */ + prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger. + */ + prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when virtual machine fails to parse the script. + */ + prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when breakpoint is resolved to an actual script and location. + */ + prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria. + */ + prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification) => void): this; + + /** + * Fired when the virtual machine resumed execution. + */ + prependOnceListener(event: "Debugger.resumed", listener: () => void): this; + + /** + * Issued when new console message is added. + */ + prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification) => void): this; + + /** + * Sent when new profile recording is started using console.profile() call. + */ + prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification) => void): this; + + prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification) => void): this; + prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this; + prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event. + */ + prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification) => void): this; + + /** + * If heap objects tracking has been started then backend may send update for one or more fragments + */ + prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification) => void): this; + } + + // Top Level API + + /** + * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. + * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. + * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Optional, defaults to false. + */ + export function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + export function close(): void; + + /** + * Return the URL of the active inspector, or undefined if there is none. + */ + export function url(): string; +} diff --git a/types/node/node-tests.ts b/types/node/node-tests.ts index 62ff37522d..4786c6cfd9 100644 --- a/types/node/node-tests.ts +++ b/types/node/node-tests.ts @@ -28,6 +28,8 @@ import * as v8 from "v8"; import * as dns from "dns"; import * as async_hooks from "async_hooks"; import * as http2 from "http2"; +import * as inspector from "inspector"; +import Module = require("module"); // Specifically test buffer module regression. import { Buffer as ImportedBuffer, SlowBuffer as ImportedSlowBuffer } from "buffer"; @@ -2175,6 +2177,15 @@ namespace timers_tests { timeout.ref(); timers.clearTimeout(timeout); } + async function testPromisify() { + const setTimeout = util.promisify(timers.setTimeout); + let v: void = await setTimeout(100); // tslint:disable-line no-void-expression void-return + let s: string = await setTimeout(100, ""); + + const setImmediate = util.promisify(timers.setImmediate); + v = await setImmediate(); // tslint:disable-line no-void-expression + s = await setImmediate(""); + } } ///////////////////////////////////////////////////////// @@ -2532,6 +2543,11 @@ namespace repl_tests { _server = _server.prependOnceListener("exit", () => { }); _server = _server.prependOnceListener("reset", () => { }); + + _server.outputStream.write("test"); + let line = _server.inputStream.read(); + + throw new repl.Recoverable(new Error("test")); } } @@ -3380,3 +3396,58 @@ namespace http2_tests { str = constants.HTTP2_METHOD_VERSION_CONTROL; } } + +/////////////////////////////////////////////////////////// +/// Inspector Tests /// +/////////////////////////////////////////////////////////// + +namespace inspector_tests { + { + inspector.open(); + inspector.open(0); + inspector.open(0, 'localhost'); + inspector.open(0, 'localhost', true); + inspector.close(); + const inspectorUrl: string = inspector.url(); + + const session = new inspector.Session(); + session.connect(); + session.disconnect(); + + // Unknown post method + session.post('A.b', { key: 'value' }, (err: Error, params: object) => {}); + session.post('A.b', (err: Error, params: object) => {}); + session.post('A.b'); + // Known post method + const parameter: inspector.Runtime.EvaluateParameterType = { expression: '2 + 2' }; + session.post('Runtime.evaluate', parameter, + (err: Error, params: inspector.Runtime.EvaluateReturnType) => {}); + session.post('Runtime.evaluate', (err: Error, params: inspector.Runtime.EvaluateReturnType) => { + const exceptionDetails: inspector.Runtime.ExceptionDetails = params.exceptionDetails; + const resultClassName: string = params.result.className; + }); + session.post('Runtime.evaluate'); + + // General event + session.on('inspectorNotification', (message: inspector.InspectorNotification) => {}); + // Known events + session.on('Debugger.paused', (message: inspector.InspectorNotification) => { + const method: string = message.method; + const pauseReason: string = message.params.reason; + }); + session.on('Debugger.resumed', () => {}); + } +} + +//////////////////////////////////////////////////// +/// module tests : http://nodejs.org/api/modules.html +//////////////////////////////////////////////////// + +namespace module_tests { + require.extensions[".ts"] = () => ""; + + Module.runMain(); + Module.wrap("some code"); + + const m1 = new Module("moduleId"); +} diff --git a/types/node/scripts/generate-inspector/README.md b/types/node/scripts/generate-inspector/README.md new file mode 100644 index 0000000000..0c87321994 --- /dev/null +++ b/types/node/scripts/generate-inspector/README.md @@ -0,0 +1,14 @@ +The entry point to this script is `index.ts`. It takes a single, optional argument (a tag in node-core), using the current Node `process.version` in lieu of this argument. + +What this does is: +- Get the inspector protocol spec at the given tag +- Generate type definitions from it +- Write to `inspector.d.ts` + +For example, to bump `inspector.d.ts` to what's exposed in v8.4: +```sh +# cwd = types/node +ts-node scripts/generate-inspector v8.4.0 +``` + +Inspector type definitions should be updated every time the V8 version is bumped in a Node.js release. diff --git a/types/node/scripts/generate-inspector/devtools-protocol-schema.ts b/types/node/scripts/generate-inspector/devtools-protocol-schema.ts new file mode 100644 index 0000000000..aaa8c9712f --- /dev/null +++ b/types/node/scripts/generate-inspector/devtools-protocol-schema.ts @@ -0,0 +1,76 @@ +// This file reflects the known structure of the JSON data file that describes the v8 inspector protocol. +// https://github.com/nodejs/node/blob/master/deps/v8/src/inspector/js_protocol.json + +export interface Documentable { + description?: string; + deprecated?: boolean; + experimental?: boolean; +} + +export interface BaseType { + type: T; +} + +export interface StringType extends BaseType<"string"> { + enum?: string[]; +} + +export interface ArrayType extends BaseType<"array"> { + items: Field; + minItems?: number; + maxItems?: number; +} + +export interface ObjectDefinition extends BaseType<"object"> { + properties?: Parameter[]; +} + +export interface ObjectReference { + $ref: string; +} + +export type TypeDefinition = BaseType<"any"|"integer"|"number"|"boolean"> | + StringType | ArrayType | ObjectDefinition; + +export type Type = TypeDefinition & Documentable & { + id: string, +}; + +export type Field = TypeDefinition | ObjectReference; + +export type Parameter = Field & Documentable & { + name: string, + optional?: boolean, +}; + +export interface Command extends Documentable { + name: string; + description?: string; + handlers?: string[]; + parameters?: Parameter[]; + returns?: Parameter[]; + experimental?: boolean; + redirect?: string; +} + +export interface Event extends Documentable { + name: string; + parameters?: Parameter[]; + description?: string; +} + +// It should be safe to load a devtools-protocol/json file and cast it to +// this type. +export interface Schema { + version: { + major: string, + minor: string, + }; + domains: Array<{ + domain: string, + types?: Type[], + commands: Command[], + events?: Event[], + dependencies?: string[], + } & Documentable>; +} diff --git a/types/node/scripts/generate-inspector/event-emitter.ts b/types/node/scripts/generate-inspector/event-emitter.ts new file mode 100644 index 0000000000..658109d6b2 --- /dev/null +++ b/types/node/scripts/generate-inspector/event-emitter.ts @@ -0,0 +1,79 @@ +// This file describes helper functions to create definitions for EventEmitter +// prototype overloads. + +import { flattenArgs } from "./utils"; + +/** + * Information needed to generate definitions. + */ +export interface Event { + comment?: string[]; + name: string; + args: Array<{ + name: string, + type: string, + }>; +} + +const createEmitStatement = (event: Event): string[] => { + const argsStr = event.args.map(arg => `${arg.name}: ${arg.type}`).join(", "); + return [ + `emit(event: "${event.name}"${event.args.length > 0 ? ", " : ""}${argsStr}): boolean;`, + ]; +}; + +const createEmitBlock = (events: Event[]): string[] => { + return [ + `emit(event: string | symbol, ...args: any[]): boolean;`, + ...events.map(createEmitStatement).reduce(flattenArgs(), []), + ]; +}; + +const createListenerFn = (fnName: string) => (event: Event): string[] => { + const argsStr = event.args.map(arg => `${arg.name}: ${arg.type}`).join(", "); + return [ + ...event.comment && event.comment.length > 0 ? [""] : [], + ...event.comment || [], + `${fnName}(event: "${event.name}", listener: (${argsStr}) => void): this;`, + ...event.comment && event.comment.length > 0 ? [""] : [], + ]; +}; + +const createListenerBlockFn = (fnName: string) => (events: Event[]): string[] => { + return [ + `${fnName}(event: string, listener: (...args: any[]) => void): this;`, + ...events.map(createListenerFn(fnName)).reduce(flattenArgs(), []), + ]; +}; + +/** + * Given an array of Event objects, return a set of type definitions for + * overloads of addListener, emit, on, once, prependListener, and + * prependOnceListener as an array of lines. + * @param events The array of Event objects to transform into type definitions. + */ +export const createListeners = (events: Event[]): string[] => { + return [ + ...createListenerBlockFn("addListener")(events), + "", + ...createEmitBlock(events), + "", + ...createListenerBlockFn("on")(events), + "", + ...createListenerBlockFn("once")(events), + "", + ...createListenerBlockFn("prependListener")(events), + "", + ...createListenerBlockFn("prependOnceListener")(events), + ].reduce((acc, next, index, arr) => { + // removes trailing and consecutive empty lines + const isLast = index === arr.length - 1; + const followsEmptyLine = acc.length > 0 && acc[acc.length - 1] === ""; + if ((isLast || followsEmptyLine) && next === "") { + return acc; + } else { + acc.push(next); + return acc; + } + }, []); +}; diff --git a/types/node/scripts/generate-inspector/generate-substitute-args.ts b/types/node/scripts/generate-inspector/generate-substitute-args.ts new file mode 100644 index 0000000000..ab5fb15840 --- /dev/null +++ b/types/node/scripts/generate-inspector/generate-substitute-args.ts @@ -0,0 +1,164 @@ +import * as schema from "./devtools-protocol-schema"; +import { createListeners } from "./event-emitter"; +import { capitalize, createDocs, flattenArgs, hasElements, isObjectReference, resolveReference } from "./utils"; + +const INDENT = " "; + +// Converts DevTools type to TS type +const createTypeString = (type: schema.Field, domain?: string): string => { + return isObjectReference(type) ? resolveReference(type.$ref, domain) : + type.type === "any" ? "any" : + type.type === "integer" ? "number" : + type.type === "number" ? "number" : + type.type === "boolean" ? "boolean" : + type.type === "string" ? "string" : + type.type === "array" ? `${createTypeString(type.items, domain)}[]` : + type.type === "object" ? "{}" // this code path is likely never exercised + : "never"; +}; + +// Helper for createInterface -- constructs a list of interface fields +const createFieldsForInterface = (fields: schema.Parameter[] | null, domain: string): string[] => { + return fields ? [ + ...fields + .map(prop => [ + ...createDocs(prop), + `${prop.name}${prop.optional ? "?" : ""}: ${createTypeString(prop, domain)};`, + ]) + .reduce(flattenArgs(), []), + ] : []; +}; + +// Create an interface or type definition (the latter if the given type isn't an object) +const createTypeDefinition = (type: schema.Type, domain: string): string[] => { + return [ + ...createDocs(type), + ...(type.type === "object" ? [ + `export interface ${type.id} {`, + ...createFieldsForInterface(type.properties, domain) + .map(line => `${INDENT}${line}`), + "}", + ] : [`export type ${type.id} = ${createTypeString(type)};`]), + ]; +}; + +// Helper for for createPostFunctions -- returns the type of a callback +const createCallbackString = (commandName: string, returns: schema.Parameter[], domain: string): string => { + return hasElements(returns) ? + `(err: Error | null, params: ${domain}.${capitalize(commandName)}ReturnType) => void` : + `(err: Error | null) => void`; +}; + +// Create declarations for overloads of Session#post +const createPostFunctions = (command: schema.Command, domain: string): string[] => { + const fnName = "post"; + const callbackStr = createCallbackString(command.name, command.returns, domain); + const result = createDocs(command); + if (hasElements(command.parameters)) { + result.push([ + `${fnName}(`, + `method: "${domain}.${command.name}", `, + `params?: ${domain}.${capitalize(command.name)}ParameterType, `, + `callback?: ${callbackStr}`, + "): void;", + ].join("")); + } + result.push([ + `${fnName}(`, + `method: "${domain}.${command.name}", `, + `callback?: ${callbackStr}`, + "): void;", + ].join("")); + return result; +}; + +/** + * Given a parsed DevTools Protocol data file, generate an object that contains text values suitable for being + * substituted into ./inspector.d.ts.template. + * @param protocol The parsed contents of the JSON file from which the DevTools Protocol docs are generated. + */ +export const generateSubstituteArgs = (protocol: schema.Schema): { [propName: string]: string[] } => { + const interfaceDefinitions: string[] = protocol.domains + .map(item => { + const typePool = (item.types || []).concat([ + ...(item.commands || []).map(command => { + let result: schema.Type = null; + if (hasElements(command.parameters)) { + result = { + id: `${capitalize(command.name)}ParameterType`, + type: "object", + properties: command.parameters, + }; + } + return result; + }), + ...(item.commands || []).map(command => { + let result: schema.Type = null; + if (hasElements(command.returns)) { + result = { + id: `${capitalize(command.name)}ReturnType`, + type: "object", + properties: command.returns, + }; + } + return result; + }), + ...(item.events || []).map(event => { + let result: schema.Type = null; + if (hasElements(event.parameters)) { + result = { + id: `${capitalize(event.name)}EventDataType`, + type: "object", + properties: event.parameters, + }; + } + return result; + }), + ].filter(x => x)); + return typePool.length > 0 ? [ + `export namespace ${item.domain} {`, + ...typePool + .map(type => createTypeDefinition(type, item.domain)) + .reduce(flattenArgs("")) + .map(line => `${INDENT}${line}`), + "}", + ] : []; + }).reduce(flattenArgs(""), []); + + const postOverloads: string[] = protocol.domains + .map(item => item.commands + .map(command => createPostFunctions(command, item.domain)) + .reduce(flattenArgs(""), [])) + .reduce(flattenArgs(), []); + + const eventOverloads: string[] = createListeners(protocol.domains + .map(item => { + if (!item.events || item.events.length === 0) { + return []; + } + return item.events + .map(event => ({ + comment: createDocs(event), + name: `${item.domain}.${event.name}`, + args: hasElements(event.parameters) ? [{ + name: "message", + type: `InspectorNotification<${item.domain}.${capitalize(event.name)}EventDataType>`, + }] : [], + })); + }) + .reduce((acc, next) => acc.concat(next), [{ + comment: [ + "/**", + " * Emitted when any notification from the V8 Inspector is received.", + " */", + ], + name: "inspectorNotification", + args: [{ name: "message", type: "InspectorNotification<{}>" }], + }])); + + return { + interfaceDefinitions, + postOverloads, + eventOverloads, + }; +}; diff --git a/types/node/scripts/generate-inspector/index.ts b/types/node/scripts/generate-inspector/index.ts new file mode 100644 index 0000000000..eb5da5ef2e --- /dev/null +++ b/types/node/scripts/generate-inspector/index.ts @@ -0,0 +1,39 @@ +// Usage: node generate-inspector [tag] +// [tag] corresponds to a tag name in the node-core repository. + +import { execSync } from "child_process"; +import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; +import * as https from "https"; +import * as schema from "./devtools-protocol-schema"; +import { generateSubstituteArgs } from "./generate-substitute-args"; +import { flattenArgs, substitute, trimRight } from "./utils"; + +// Input arguments +const tag = process.argv[2] || process.version; + +const PROTOCOL_URL = `https://raw.githubusercontent.com/nodejs/node/${tag}/deps/v8/src/inspector/js_protocol.json`; + +const devToolsPath = `${__dirname}/../../node_modules/devtools-protocol`; + +function writeProtocolToFile(json: string) { + const protocol: schema.Schema = JSON.parse(json); + + const template = readFileSync(`${__dirname}/inspector.d.ts.template`, "utf8"); + + const substituteArgs = generateSubstituteArgs(protocol); + const inspectorDts = substitute(template, substituteArgs).split("\n") + .map(line => trimRight(line)) + .join("\n"); + + writeFileSync("./inspector.d.ts", inspectorDts, "utf8"); +} + +https.get(PROTOCOL_URL, res => { + const frames: Buffer[] = []; + res.on("data", (data: Buffer) => { + frames.push(data); + }); + res.on("end", () => { + writeProtocolToFile(Buffer.concat(frames).toString("utf8")); + }); +}); diff --git a/types/node/scripts/generate-inspector/inspector.d.ts.template b/types/node/scripts/generate-inspector/inspector.d.ts.template new file mode 100644 index 0000000000..06ad692752 --- /dev/null +++ b/types/node/scripts/generate-inspector/inspector.d.ts.template @@ -0,0 +1,72 @@ +// Type definitions for inspector + +// These definitions are auto-generated. +// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330 +// for more information. + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module "inspector" { + import { EventEmitter } from 'events'; + + export interface InspectorNotification { + method: string; + params: T; + } + + // # interfaceDefinitions + + /** + * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications. + */ + export class Session extends EventEmitter { + /** + * Create a new instance of the inspector.Session class. The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend. + */ + constructor(); + + /** + * Connects a session to the inspector back-end. An exception will be thrown if there is already a connected session established either through the API or by a front-end connected to the Inspector WebSocket port. + */ + connect(): void; + + /** + * Immediately close the session. All pending message callbacks will be called with an error. session.connect() will need to be called to be able to send messages again. Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints. + */ + disconnect(): void; + + /** + * Posts a message to the inspector back-end. callback will be notified when a response is received. callback is a function that accepts two optional arguments - error and message-specific result. + */ + post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void; + post(method: string, callback?: (err: Error | null, params?: {}) => void): void; + + // # postOverloads + + // Events + + // # eventOverloads + } + + // Top Level API + + /** + * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started. + * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client. + * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI. + * @param wait Block until a client has connected. Optional, defaults to false. + */ + export function open(port?: number, host?: string, wait?: boolean): void; + + /** + * Deactivate the inspector. Blocks until there are no active connections. + */ + export function close(): void; + + /** + * Return the URL of the active inspector, or undefined if there is none. + */ + export function url(): string; +} diff --git a/types/node/scripts/generate-inspector/utils.ts b/types/node/scripts/generate-inspector/utils.ts new file mode 100644 index 0000000000..9fd2f4a6b7 --- /dev/null +++ b/types/node/scripts/generate-inspector/utils.ts @@ -0,0 +1,111 @@ +// Utility functions + +import { Documentable, Field, ObjectReference } from "./devtools-protocol-schema"; + +/** + * Returns a function suitable for Array#reduce that flattens an array of + * arrays. + * @param inBetween A value to insert between groups of flattened values + */ +export function flattenArgs(inBetween?: T) { + if (inBetween != null) { + return (acc: T[], next: T[]) => { + if (acc.length > 0) { + return acc.concat([inBetween], next); + } else { + return acc.concat(next); + } + }; + } else { + return (acc: T[], next: T[]) => acc.concat(next); + } +} + +/** + * Returns whether an array exists and has elements. + * @param a The array to check. + */ +export const hasElements = (a: any[]): boolean => a && a.length > 0; + +/** + * Returns the capitalized form of a given string. + * @param s The string to capitalize + */ +export const capitalize = (s: string): string => s.charAt(0).toUpperCase() + s.slice(1); + +/** + * Returns whether a given object is an ObjectReference. + * @param t An object whose type should be checked + */ +export function isObjectReference(t: Field): t is ObjectReference { + return "$ref" in t; +} + +/** + * Given a Documentable object, return a comment block generated from its + * contents, or an empty array if the object doesn't contain any information + * to populate a comment block. + * @param documentable A Documentable object. + */ +export const createDocs = (documentable: Documentable): string[] => { + const hasDocs = !!documentable.description || + documentable.deprecated || + documentable.experimental; + return hasDocs ? [ + "/**", + documentable.description && ` * ${documentable.description}`, + documentable.deprecated && " * @deprecated", + documentable.experimental && " * @experimental", + " */", + ].filter(l => l != null) : []; +}; + +/** + * Given a string, prepend a given domain string to it if applicable. + * @param ref The name of a class within a domain to reference. + * @param domain The domain string to prepend. + */ +export const resolveReference = (ref: string, domain?: string): string => { + if (!domain || ref.indexOf(".") !== -1) { + return ref; + } else { + return `${domain}.${ref}`; + } +}; + +/** + * Given a string, replace lines that match a known pattern (...// # propName) + * with args[propName] if it exists. + * @param str The input string. + * @param args An object mapping strings to arrays of strings. + */ +export const substitute = ( + str: string, + args: { [propName: string]: string[] }, +): string => { + return str.split("\n") + .map(line => { + const regex = /(\s*)\/\/ # (.*)/; + const matches = line.match(regex); + if (matches) { + const [_0, prefix, argName] = matches; + if (args[argName]) { + return args[argName].map(l => prefix + l); + } else { + return []; + } + } + return [line]; + }) + .reduce(flattenArgs(), []) + .join("\n"); +}; + +export const trimRight = (s: string): string => { + // TODO(kjin): This is terrible + const numTrailingSpaces: number = s.split("").reverse().findIndex(c => c !== " "); + if (numTrailingSpaces === -1) { + return ""; + } + return s.slice(0, s.length - numTrailingSpaces); +}; diff --git a/types/node/v0/tslint.json b/types/node/v0/tslint.json index 3e842be21f..f4eb951ec6 100644 --- a/types/node/v0/tslint.json +++ b/types/node/v0/tslint.json @@ -23,6 +23,7 @@ "no-namespace": false, "no-padding": false, "no-string-throw": false, + "no-unnecessary-generics": false, "no-unnecessary-qualifier": false, "no-var-keyword": false, "object-literal-shorthand": false, diff --git a/types/numjs/tslint.json b/types/numjs/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/numjs/tslint.json +++ b/types/numjs/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 7a6ca787f7..d149ef18bc 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -12578,11 +12578,15 @@ declare module olx { /** - * @typedef {{duration: (number|undefined), + * @typedef {{constrainResolution: (boolean|undefined), + * duration: (number|undefined), + * timeout: (number|undefined), * useAnchor: (boolean|undefined)}} */ interface MouseWheelZoomOptions { + constrainResolution?: boolean; duration?: number; + timeout?: number; useAnchor?: boolean; } @@ -12598,9 +12602,11 @@ declare module olx { /** - * @typedef {{duration: (number|undefined)}} + * @typedef {{constrainResolution: (boolean|undefined) + * duration: (number|undefined)}} */ interface PinchZoomOptions { + constrainResolution?: boolean; duration?: number; } diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index f0abcf28ce..f35c0adc98 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -717,6 +717,17 @@ const select: ol.interaction.Select = new ol.interaction.Select({ layers: (layer: ol.layer.Layer) => true, }); +let pinchZoom: ol.interaction.PinchZoom = new ol.interaction.PinchZoom({ + constrainResolution: booleanValue, + duration: numberValue +}); + +let mouseWheelZoom: ol.interaction.MouseWheelZoom = new ol.interaction.MouseWheelZoom({ + constrainResolution: booleanValue, + duration: numberValue, + timeout: numberValue, + useAnchor: booleanValue +}); // // ol.style.RegularShape // diff --git a/types/p-defer/tslint.json b/types/p-defer/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/p-defer/tslint.json +++ b/types/p-defer/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/p-props/tslint.json b/types/p-props/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/p-props/tslint.json +++ b/types/p-props/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/parse/index.d.ts b/types/parse/index.d.ts index 1910899551..82194e65a2 100644 --- a/types/parse/index.d.ts +++ b/types/parse/index.d.ts @@ -1,8 +1,9 @@ -// Type definitions for parse 2.2 +// Type definitions for parse 2.4 // Project: https://parse.com/ // Definitions by: Ullisen Media Group // David Poetzsch-Heffter // Cedric Kemp +// Flavio Negrão // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -96,7 +97,7 @@ declare namespace Parse { reject(error: any): void; resolve(result: any): void; then(resolvedCallback: (...values: T[]) => IPromise, - rejectedCallback?: (reason: any) => IPromise): IPromise; + rejectedCallback?: (reason: any) => IPromise): IPromise; then(resolvedCallback: (...values: T[]) => U, rejectedCallback?: (reason: any) => IPromise): IPromise; then(resolvedCallback: (...values: T[]) => U, @@ -189,7 +190,7 @@ declare namespace Parse { * this is omitted, the content type will be inferred from the name's * extension. */ - class File { + class File { constructor(name: string, data: any, type?: string); name(): string; @@ -331,8 +332,8 @@ declare namespace Parse { static extend(className: string, protoProps?: any, classProps?: any): any; static fromJSON(json: any, override: boolean): any; - static fetchAll(list: T[], options: SuccessFailureOptions): Promise; - static fetchAllIfNeeded(list: T[], options: SuccessFailureOptions): Promise; + static fetchAll(list: T[], options: Object.FetchAllOptions): Promise; + static fetchAllIfNeeded(list: T[], options: Object.FetchAllOptions): Promise; static destroyAll(list: T[], options?: Object.DestroyAllOptions): Promise; static saveAll(list: T[], options?: Object.SaveAllOptions): Promise; static registerSubclass(className: string, clazz: new (options?: any) => T): void; @@ -375,6 +376,8 @@ declare namespace Parse { interface DestroyAllOptions extends SuccessFailureOptions, ScopeOptions { } + interface FetchAllOptions extends SuccessFailureOptions, ScopeOptions { } + interface FetchOptions extends SuccessFailureOptions, ScopeOptions { } interface SaveOptions extends SuccessFailureOptions, SilentOption, ScopeOptions, WaitOption { } @@ -582,7 +585,7 @@ declare namespace Parse { className: string; constructor(objectClass: string); - constructor(objectClass: new(...args: any[]) => T); + constructor(objectClass: new (...args: any[]) => T); static or(...var_args: Query[]): Query; @@ -886,11 +889,17 @@ declare namespace Parse { object: Object; } - interface AfterSaveRequest extends TriggerRequest {} - interface AfterDeleteRequest extends TriggerRequest {} - interface BeforeDeleteRequest extends TriggerRequest {} - interface BeforeDeleteResponse extends FunctionResponse {} - interface BeforeSaveRequest extends TriggerRequest {} + interface BeforeFindTriggerRequest extends TriggerRequest { + query?: Query + count?: boolean + } + + interface AfterSaveRequest extends TriggerRequest { } + interface AfterDeleteRequest extends TriggerRequest { } + interface BeforeDeleteRequest extends TriggerRequest { } + interface BeforeDeleteResponse extends FunctionResponse { } + interface BeforeSaveRequest extends TriggerRequest { } + interface BeforeFindRequest extends BeforeFindTriggerRequest { } interface BeforeSaveResponse extends FunctionResponse { success: () => void; } @@ -970,56 +979,56 @@ declare namespace Parse { OTHER_CAUSE = -1, INTERNAL_SERVER_ERROR = 1, - CONNECTION_FAILED = 100, - OBJECT_NOT_FOUND = 101, - INVALID_QUERY = 102, - INVALID_CLASS_NAME = 103, - MISSING_OBJECT_ID = 104, - INVALID_KEY_NAME = 105, - INVALID_POINTER = 106, - INVALID_JSON = 107, - COMMAND_UNAVAILABLE = 108, - NOT_INITIALIZED = 109, - INCORRECT_TYPE = 111, - INVALID_CHANNEL_NAME = 112, - PUSH_MISCONFIGURED = 115, - OBJECT_TOO_LARGE = 116, - OPERATION_FORBIDDEN = 119, - CACHE_MISS = 120, - INVALID_NESTED_KEY = 121, - INVALID_FILE_NAME = 122, - INVALID_ACL = 123, - TIMEOUT = 124, - INVALID_EMAIL_ADDRESS = 125, - MISSING_CONTENT_TYPE = 126, - MISSING_CONTENT_LENGTH = 127, - INVALID_CONTENT_LENGTH = 128, - FILE_TOO_LARGE = 129, - FILE_SAVE_ERROR = 130, - DUPLICATE_VALUE = 137, - INVALID_ROLE_NAME = 139, - EXCEEDED_QUOTA = 140, - SCRIPT_FAILED = 141, - VALIDATION_ERROR = 142, - INVALID_IMAGE_DATA = 150, - UNSAVED_FILE_ERROR = 151, + CONNECTION_FAILED = 100, + OBJECT_NOT_FOUND = 101, + INVALID_QUERY = 102, + INVALID_CLASS_NAME = 103, + MISSING_OBJECT_ID = 104, + INVALID_KEY_NAME = 105, + INVALID_POINTER = 106, + INVALID_JSON = 107, + COMMAND_UNAVAILABLE = 108, + NOT_INITIALIZED = 109, + INCORRECT_TYPE = 111, + INVALID_CHANNEL_NAME = 112, + PUSH_MISCONFIGURED = 115, + OBJECT_TOO_LARGE = 116, + OPERATION_FORBIDDEN = 119, + CACHE_MISS = 120, + INVALID_NESTED_KEY = 121, + INVALID_FILE_NAME = 122, + INVALID_ACL = 123, + TIMEOUT = 124, + INVALID_EMAIL_ADDRESS = 125, + MISSING_CONTENT_TYPE = 126, + MISSING_CONTENT_LENGTH = 127, + INVALID_CONTENT_LENGTH = 128, + FILE_TOO_LARGE = 129, + FILE_SAVE_ERROR = 130, + DUPLICATE_VALUE = 137, + INVALID_ROLE_NAME = 139, + EXCEEDED_QUOTA = 140, + SCRIPT_FAILED = 141, + VALIDATION_ERROR = 142, + INVALID_IMAGE_DATA = 150, + UNSAVED_FILE_ERROR = 151, INVALID_PUSH_TIME_ERROR = 152, FILE_DELETE_ERROR = 153, REQUEST_LIMIT_EXCEEDED = 155, INVALID_EVENT_NAME = 160, - USERNAME_MISSING = 200, - PASSWORD_MISSING = 201, - USERNAME_TAKEN = 202, - EMAIL_TAKEN = 203, - EMAIL_MISSING = 204, - EMAIL_NOT_FOUND = 205, - SESSION_MISSING = 206, - MUST_CREATE_USER_THROUGH_SIGNUP = 207, - ACCOUNT_ALREADY_LINKED = 208, + USERNAME_MISSING = 200, + PASSWORD_MISSING = 201, + USERNAME_TAKEN = 202, + EMAIL_TAKEN = 203, + EMAIL_MISSING = 204, + EMAIL_NOT_FOUND = 205, + SESSION_MISSING = 206, + MUST_CREATE_USER_THROUGH_SIGNUP = 207, + ACCOUNT_ALREADY_LINKED = 208, INVALID_SESSION_TOKEN = 209, - LINKED_ID_MISSING = 250, - INVALID_LINKED_SESSION = 251, - UNSUPPORTED_SERVICE = 252, + LINKED_ID_MISSING = 250, + INVALID_LINKED_SESSION = 251, + UNSUPPORTED_SERVICE = 252, AGGREGATE_ERROR = 600, FILE_READ_ERROR = 601, X_DOMAIN_REQUEST = 602 diff --git a/types/parse/parse-tests.ts b/types/parse/parse-tests.ts index e380188f72..76440e46d3 100644 --- a/types/parse/parse-tests.ts +++ b/types/parse/parse-tests.ts @@ -38,10 +38,10 @@ function test_object() { var game = new Game(); game.fetch({ - success(g: Game) {} + success(g: Game) { } }); -// Create a new instance of that class. + // Create a new instance of that class. var gameScore = new GameScore(); gameScore.set("score", 1337); @@ -93,11 +93,11 @@ function test_query() { // Finds scores from any of Jonathan, Dario, or Shawn query.containedIn("playerName", - ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); + ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); // Finds scores from anyone who is neither Jonathan, Dario, nor Shawn query.notContainedIn("playerName", - ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); + ["Jonathan Walsh", "Dario Wunsch", "Shawn Simon"]); // Finds objects that have the score set query.exists("score"); @@ -154,9 +154,9 @@ function test_collections() { }; collection.add([ - {"name": "Duke"}, - {"name": "Scarlett"} - ]); + { "name": "Duke" }, + { "name": "Scarlett" } + ]); collection.fetch().then( (data) => { @@ -177,9 +177,9 @@ function test_collections() { // Completely replace all items in the collection. collection.reset([ - {"name": "Hawk"}, - {"name": "Jane"} - ]); + { "name": "Hawk" }, + { "name": "Jane" } + ]); } function test_file() { @@ -187,7 +187,7 @@ function test_file() { var base64 = "V29ya2luZyBhdCBQYXJzZSBpcyBncmVhdCE="; var file = new Parse.File("myfile.txt", { base64: base64 }); - var bytes = [ 0xBE, 0xEF, 0xCA, 0xFE ]; + var bytes = [0xBE, 0xEF, 0xCA, 0xFE]; var file = new Parse.File("myfile.txt", bytes); var file = new Parse.File("myfile.zzz", {}, "image/png"); @@ -195,12 +195,12 @@ function test_file() { var src = file.url(); file.save().then( - () => { - // The file has been saved to Parse. - }, - (error) => { - // The file either could n ot be read, or could not be saved to Parse. - }); + () => { + // The file has been saved to Parse. + }, + (error) => { + // The file either could n ot be read, or could not be saved to Parse. + }); Parse.Cloud.httpRequest({ url: file.url() }).then((response: Parse.Cloud.HttpResponse) => { // result @@ -219,7 +219,7 @@ function test_analytics() { // Do searches happen more often on weekdays or weekends? dayType: 'weekday' }; - // Send the dimensions to Parse along with the 'search' event + // Send the dimensions to Parse along with the 'search' event Parse.Analytics.track('search', dimensions); var codeString = '404'; @@ -227,7 +227,7 @@ function test_analytics() { } function test_relation() { - new Parse.User().relation("games").query().find().then((g: Game[]) => {}); + new Parse.User().relation("games").query().find().then((g: Game[]) => { }); } function test_user_acl_roles() { @@ -237,7 +237,7 @@ function test_user_acl_roles() { user.set("password", "my pass"); user.set("email", "email@example.com"); -// other fields can be set just like with Parse.Object + // other fields can be set just like with Parse.Object user.set("phone", "415-392-0202"); var currentUser = Parse.User.current(); @@ -256,7 +256,7 @@ function test_user_acl_roles() { var game = new Game(); game.set("score", new GameScore()); game.setACL(new Parse.ACL(Parse.User.current())); - game.save().then((game: Game) => {}); + game.save().then((game: Game) => { }); game.save(null, { useMasterKey: true }); var groupACL = new Parse.ACL(); @@ -285,18 +285,18 @@ function test_user_acl_roles() { role.save(); Parse.User.logOut().then(function (data) { - // logged out + // logged out }); } function test_facebook_util() { Parse.FacebookUtils.init({ - appId : 'YOUR_APP_ID', // Facebook App ID - channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File - cookie : true, // enable cookies to allow Parse to access the session - xfbml : true // parse XFBML - }); + appId: 'YOUR_APP_ID', // Facebook App ID + channelUrl: '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File + cookie: true, // enable cookies to allow Parse to access the session + xfbml: true // parse XFBML + }); Parse.FacebookUtils.logIn(null, { success: (user: Parse.User) => { @@ -350,16 +350,23 @@ function test_cloud_functions() { }); Parse.Cloud.beforeDelete('MyCustomClass', (request: Parse.Cloud.BeforeDeleteRequest, - response: Parse.Cloud.BeforeDeleteResponse) => { + response: Parse.Cloud.BeforeDeleteResponse) => { // result }); + + Parse.Cloud.beforeFind('MyCustomClass', (request: Parse.Cloud.BeforeFindRequest) => { + let query = request.query; // the Parse.Query + let user = request.user; // the user + let isMaster = request.master; // if the query is run with masterKey + let isCount = request.count; // if the query is a count operation (available on parse-server 2.4.0 or up) + }); } -class PlaceObject extends Parse.Object {} +class PlaceObject extends Parse.Object { } function test_geo_points() { - var point = new Parse.GeoPoint({latitude: 40.0, longitude: -30.0}); + var point = new Parse.GeoPoint({ latitude: 40.0, longitude: -30.0 }); var userObject = Parse.User.current()!; @@ -368,9 +375,9 @@ function test_geo_points() { // Create a query for places var query = new Parse.Query(Parse.User); -// Interested in locations near user. + // Interested in locations near user. query.near("location", userGeoPoint); - // Limit what could be a lot of points. + // Limit what could be a lot of points. query.limit(10); var southwestOfSF = new Parse.GeoPoint(37.708813, -122.526398); @@ -379,24 +386,24 @@ function test_geo_points() { var query2 = new Parse.Query(PlaceObject); query2.withinGeoBox("location", southwestOfSF, northeastOfSF); - var query3 = new Parse.Query("PlaceObject").find().then((o: Parse.Object[]) => {}); + var query3 = new Parse.Query("PlaceObject").find().then((o: Parse.Object[]) => { }); } function test_push() { Parse.Push.send({ - channels: [ "Gia nts", "Mets" ], + channels: ["Gia nts", "Mets"], data: { alert: "The Giants won against the Mets 2-3." } }, { - success: () => { - // Push was successful - }, - error: (error: any) => { - // Handle error - } - }); + success: () => { + // Push was successful + }, + error: (error: any) => { + // Handle error + } + }); var query = new Parse.Query(Parse.Installation); query.equalTo('injuryReports', true); @@ -407,13 +414,13 @@ function test_push() { alert: "Willie Hayes injured by own pop fly." } }, { - success: function() { - // Push was successful - }, - error: function(error: any) { - // Handle error - } - }); + success: function () { + // Push was successful + }, + error: function (error: any) { + // Handle error + } + }); } function test_view() { @@ -425,12 +432,31 @@ function test_view() { function test_promise() { let resolved = Parse.Promise.as(true); let rejected = Parse.Promise.error("an error object"); - Parse.Promise.when([resolved, rejected]).then(function() { + Parse.Promise.when([resolved, rejected]).then(function () { // success - }, function() { + }, function () { // failed }); // can check whether an object is a Parse.Promise object or not Parse.Promise.is(resolved); } + +function test_batch_operations() { + const game1 = new Game() + const game2 = new Game() + const games = [game1, game2] + + // Master key + Parse.Object.saveAll(games, { useMasterKey: true }) + Parse.Object.destroyAll(games, { useMasterKey: true }) + Parse.Object.fetchAll(games, { useMasterKey: true }) + Parse.Object.fetchAllIfNeeded(games, { useMasterKey: true }) + + // Session token + Parse.Object.saveAll(games, { sessionToken: '' }) + Parse.Object.destroyAll(games, { sessionToken: '' }) + Parse.Object.fetchAll(games, { sessionToken: '' }) + Parse.Object.fetchAllIfNeeded(games, { sessionToken: '' }) +} + diff --git a/types/passport-facebook/index.d.ts b/types/passport-facebook/index.d.ts index 01db85012d..184e4711e2 100644 --- a/types/passport-facebook/index.d.ts +++ b/types/passport-facebook/index.d.ts @@ -1,20 +1,23 @@ -// Type definitions for passport-facebook 2.1.1 +// Type definitions for passport-facebook 2.1 // Project: https://github.com/jaredhanson/passport-facebook // Definitions by: James Roland Cabresos , Lucas Acosta // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -/// - - - import passport = require('passport'); import express = require('express'); -interface Profile extends passport.Profile { +export interface Profile extends passport.Profile { + id: string; + displayName: string; gender?: string; + ageRange?: { + min: number; + max?: number; + }; profileUrl?: string; username?: string; + birthday: string; _raw: string; _json: any; @@ -24,7 +27,7 @@ export interface AuthenticateOptions extends passport.AuthenticateOptions { authType?: string; } -interface IStrategyOption { +export interface StrategyOption { clientID: string; clientSecret: string; callbackURL: string; @@ -34,22 +37,20 @@ interface IStrategyOption { profileFields?: string[]; } -interface IStrategyOptionWithRequest extends IStrategyOption { +export interface StrategyOptionWithRequest extends StrategyOption { passReqToCallback: true; } -interface VerifyFunction { - (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void): void; -} +export type VerifyFunction = + (accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void; -interface VerifyFunctionWithRequest { - (req: express.Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void): void; -} +export type VerifyFunctionWithRequest = + (req: express.Request, accessToken: string, refreshToken: string, profile: Profile, done: (error: any, user?: any, info?: any) => void) => void; + +export class Strategy implements passport.Strategy { + constructor(options: StrategyOptionWithRequest, verify: VerifyFunctionWithRequest); + constructor(options: StrategyOption, verify: VerifyFunction); -declare class Strategy implements passport.Strategy { - constructor(options: IStrategyOptionWithRequest, verify: VerifyFunctionWithRequest); - constructor(options: IStrategyOption, verify: VerifyFunction); - name: string; - authenticate: (req: express.Request, options?: Object) => void; + authenticate: (req: express.Request, options?: object) => void; } diff --git a/types/passport-facebook/passport-facebook-tests.ts b/types/passport-facebook/passport-facebook-tests.ts index 8442893971..52ef4095a1 100644 --- a/types/passport-facebook/passport-facebook-tests.ts +++ b/types/passport-facebook/passport-facebook-tests.ts @@ -1,4 +1,4 @@ - +/* tslint:disable */ /** * Created by jcabresos on 4/19/2014. */ diff --git a/types/passport-facebook/tslint.json b/types/passport-facebook/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/passport-facebook/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file diff --git a/types/passport-local/index.d.ts b/types/passport-local/index.d.ts index 4a87b132d8..70c3ecfdfc 100644 --- a/types/passport-local/index.d.ts +++ b/types/passport-local/index.d.ts @@ -7,7 +7,7 @@ -import passport = require('passport'); +import { Strategy as PassportStrategy } from 'passport-strategy'; import express = require('express'); interface IStrategyOptions { @@ -34,11 +34,10 @@ interface VerifyFunction { (username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void; } -declare class Strategy implements passport.Strategy { +declare class Strategy extends PassportStrategy { constructor(options: IStrategyOptionsWithRequest, verify: VerifyFunctionWithRequest); constructor(options: IStrategyOptions, verify: VerifyFunction); constructor(verify: VerifyFunction); name: string; - authenticate: (req: express.Request, options?: Object) => void; } diff --git a/types/passport-local/passport-local-tests.ts b/types/passport-local/passport-local-tests.ts index c177664103..a282cb53d3 100644 --- a/types/passport-local/passport-local-tests.ts +++ b/types/passport-local/passport-local-tests.ts @@ -12,6 +12,10 @@ interface IUser { username: string; } +const testingLocalStrategy = new local.Strategy(()=>{}); +testingLocalStrategy.success = () => {}; +testingLocalStrategy.fail = () => {}; + class User implements IUser { public username: string; public password: string; diff --git a/types/pg-escape/index.d.ts b/types/pg-escape/index.d.ts new file mode 100644 index 0000000000..4b995c3fde --- /dev/null +++ b/types/pg-escape/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for pg-escape 0.2 +// Project: https://github.com/segmentio/pg-escape +// Definitions by: Cameron Yan +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +export = escape; + +declare function escape(fmt: string, ...args: any[]): string; + +declare namespace escape { + function string(val: string): string; + function dollarQuotedString(val: string): string; + function ident(val: string): string; + function literal(val: string): string; +} diff --git a/types/pg-escape/pg-escape-tests.ts b/types/pg-escape/pg-escape-tests.ts new file mode 100644 index 0000000000..36636cf0c2 --- /dev/null +++ b/types/pg-escape/pg-escape-tests.ts @@ -0,0 +1,7 @@ +import * as escape from 'pg-escape'; + +escape('INSERT INTO %I VALUES(%L)', 'books', "O'Reilly"); +escape.string("ab'cd"); +escape.dollarQuotedString("ab'cd"); +escape.ident('1234'); +escape.literal('1234'); diff --git a/types/pg-escape/tsconfig.json b/types/pg-escape/tsconfig.json new file mode 100644 index 0000000000..ad675e0892 --- /dev/null +++ b/types/pg-escape/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pg-escape-tests.ts" + ] +} diff --git a/types/pg-escape/tslint.json b/types/pg-escape/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/pg-escape/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/pg-query-stream/pg-query-stream-tests.ts b/types/pg-query-stream/pg-query-stream-tests.ts index 6c4c034102..1df78ea648 100644 --- a/types/pg-query-stream/pg-query-stream-tests.ts +++ b/types/pg-query-stream/pg-query-stream-tests.ts @@ -8,7 +8,8 @@ const options: QueryStream.Options = { const query = new QueryStream('SELECT * FROM generate_series(0, $1) num', [1000000], options); -pg.connect('', (err, client, done) => { +const pool = new pg.Pool(); +pool.connect((err, client, done) => { const stream = client.query(query); stream.on('end', () => { client.end(); @@ -17,3 +18,4 @@ pg.connect('', (err, client, done) => { console.log(data); }); }); +pool.end(); diff --git a/types/pg/index.d.ts b/types/pg/index.d.ts index da6f4db575..f98f952884 100644 --- a/types/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -1,6 +1,6 @@ -// Type definitions for pg 6.1 +// Type definitions for pg 7.1 // Project: https://github.com/brianc/node-postgres -// Definitions by: Phips Peter +// Definitions by: Phips Peter // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -9,16 +9,13 @@ import events = require("events"); import stream = require("stream"); import pgTypes = require("pg-types"); -export declare function connect(connection: string, callback: (err: Error, client: Client, done: (err?: any) => void) => void): void; -export declare function connect(config: ClientConfig, callback: (err: Error, client: Client, done: (err?: any) => void) => void): void; -export declare function end(): void; - export interface ConnectionConfig { user?: string; database?: string; password?: string; port?: number; host?: string; + connectionString?: string; } export interface Defaults extends ConnectionConfig { @@ -39,10 +36,9 @@ export interface PoolConfig extends ClientConfig { // properties from module 'node-pool' max?: number; min?: number; - refreshIdle?: boolean; + connectionTimeoutMillis?: number; idleTimeoutMillis?: number; - reapIntervalMillis?: number; - returnToHead?: boolean; + application_name?: string; Promise?: PromiseConstructorLike; } @@ -60,25 +56,35 @@ export interface QueryResult { rows: any[]; } +export interface Notification { + processId: number; + channel: string; + payload?: string; +} + export interface ResultBuilder extends QueryResult { addRow(row: any): void; } -export declare class Pool extends events.EventEmitter { +export class Pool extends events.EventEmitter { // `new Pool('pg://user@localhost/mydb')` is not allowed. // But it passes type check because of issue: // https://github.com/Microsoft/TypeScript/issues/7485 constructor(config?: PoolConfig); + readonly totalCount: number; + readonly idleCount: number; + readonly waitingCount: number; + connect(): Promise; connect(callback: (err: Error, client: Client, done: () => void) => void): void; - end(callback?: () => void): Promise; + end(): Promise; + end(callback: () => void): void; query(queryStream: QueryConfig & stream.Readable): stream.Readable; - query(queryTextOrConfig: string | QueryConfig): Promise; - query(queryText: string, values: any[]): Promise; - + query(queryConfig: QueryConfig): Promise; + query(queryText: string, values?: any[]): Promise; query(queryTextOrConfig: string | QueryConfig, callback: (err: Error, result: QueryResult) => void): Query; query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): Query; @@ -86,18 +92,20 @@ export declare class Pool extends events.EventEmitter { on(event: "connect" | "acquire", listener: (client: Client) => void): this; } -export declare class Client extends events.EventEmitter { - constructor(connection: string); +export class Client extends events.EventEmitter { constructor(config: ClientConfig); - connect(callback?: (err: Error) => void): void; - end(callback?: (err: Error) => void): void; + connect(): Promise; + connect(callback: (err: Error) => void): void; + + end(): Promise; + end(callback: (err: Error) => void): void; + release(err?: Error): void; query(queryStream: QueryConfig & stream.Readable): stream.Readable; - query(queryTextOrConfig: string | QueryConfig): Promise; - query(queryText: string, values: any[]): Promise; - + query(queryConfig: QueryConfig): Promise; + query(queryText: string, values?: any[]): Promise; query(queryTextOrConfig: string | QueryConfig, callback: (err: Error, result: QueryResult) => void): Query; query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): Query; @@ -109,20 +117,25 @@ export declare class Client extends events.EventEmitter { on(event: "drain", listener: () => void): this; on(event: "error", listener: (err: Error) => void): this; - on(event: "notification" | "notice", listener: (message: any) => void): this; + on(event: "notification" | "notice", listener: (message: Notification) => void): this; + // tslint:disable-next-line unified-signatures on(event: "end", listener: () => void): this; } -export declare class Query extends events.EventEmitter { +export class Query extends events.EventEmitter { on(event: "row", listener: (row: any, result?: ResultBuilder) => void): this; on(event: "error", listener: (err: Error) => void): this; on(event: "end", listener: (result: ResultBuilder) => void): this; } -export declare class Events extends events.EventEmitter { +export class Events extends events.EventEmitter { on(event: "error", listener: (err: Error, client: Client) => void): this; } export const types: typeof pgTypes; export const defaults: Defaults & ClientConfig; + +import * as Pg from 'pg'; + +export const native: typeof Pg | null; diff --git a/types/pg/pg-tests.ts b/types/pg/pg-tests.ts index 4b4cfba7ec..1f1e312544 100644 --- a/types/pg/pg-tests.ts +++ b/types/pg/pg-tests.ts @@ -1,39 +1,24 @@ import * as pg from "pg"; -var conString = "postgres://username:password@localhost/database"; - // https://github.com/brianc/node-pg-types +// tslint:disable-next-line no-unnecessary-callback-wrapper pg.types.setTypeParser(20, val => Number(val)); -// Client pooling -pg.defaults.ssl = true; -pg.connect(conString, (err, client, done) => { - if (err) { - return console.error("Error fetching client from pool", err); - } - client.query("SELECT $1::int AS number", ["1"], (err, result) => { - if (err) { - done(err); - return console.error("Error running query", err); - } - else { - done(); - } - console.log(result.rows[0]["number"]); - return null; - }); - return null; +const client = new pg.Client({ + host: 'my.database-server.com', + port: 5334, + user: 'database-user', + password: 'secretpassword!!', }); - -// Simple -var client = new pg.Client(conString); client.connect(err => { if (err) { - return console.error("Could not connect to postgres", err); + console.error("Could not connect to postgres", err); + return; } client.query("SELECT NOW() AS 'theTime'", (err, result) => { if (err) { - return console.error("Error running query", err); + console.error("Error running query", err); + return; } console.log(result.rowCount); console.log(result.rows[0]["theTime"]); @@ -44,38 +29,108 @@ client.connect(err => { }); client.on('end', () => console.log("Client was disconnected.")); -// client pooling +client.connect() + .then(() => console.log('connected')) + .catch(e => console.error('connection error', e.stack)); -var config = { - user: 'foo', //env var: PGUSER - database: 'my_db', //env var: PGDATABASE - password: 'secret', //env var: PGPASSWORD - port: 5432, //env var: PGPORT - max: 10, // max number of clients in the pool - idleTimeoutMillis: 30000, // how long a client is allowed to remain idle before being closed - Promise, +client.query('SELECT NOW()', (err, res) => { + if (err) throw err; + console.log(res); + client.end(); +}); + +client.query('SELECT $1::text as name', ['brianc'], (err, res) => { + if (err) throw err; + console.log(res); + client.end(); +}); + +const query = { + name: 'get-name', + text: 'SELECT $1::text', + values: ['brianc'], + rowMode: 'array' }; -var pool = new pg.Pool(config); +client.query(query, (err, res) => { + if (err) { + console.error(err.stack); + } else { + console.log(res.rows); + } +}); +client.query(query) + .then(res => { + console.log(res.rows); + }) + .catch(e => { + console.error(e.stack); + }); +client.end((err) => { + console.log('client has disconnected'); + if (err) { + console.log('error during disconnection', err.stack); + } +}); + +client.end() + .then(() => console.log('client has disconnected')) + .catch(err => console.error('error during disconnection', err.stack)); + +const poolOne = new pg.Pool({ + connectionString: 'postgresql://dbuser:secretpassword@database.server.com:3211/mydb' +}); + +const pool = new pg.Pool({ + host: 'localhost', + port: 5432, + user: 'database-user', + database: 'my_db', + max: 20, + idleTimeoutMillis: 30000, + connectionTimeoutMillis: 2000, +}); +console.log(pool.totalCount); pool.connect((err, client, done) => { - if(err) { - return console.error('error fetching client from pool', err); + if (err) { + console.error('error fetching client from pool', err); + return; } client.query('SELECT $1::int AS number', ['1'], (err, result) => { done(); - if(err) { - return console.error('error running query', err); + if (err) { + console.error('error running query', err); + return; } console.log(result.rows[0].number); }); }); pool.on('error', (err, client) => { - console.error('idle client error', err.message, err.stack) -}) - -pool.end(); -pool.end(() => { - console.log("pool is closed"); + console.error('idle client error', err.message, err.stack); }); + +pool.query('SELECT $1::text as name', ['brianc'], (err, result) => { + if (err) { + console.error('Error executing query', err.stack); + return; + } + console.log(result.rows[0].name); +}); + +pool.query('SELECT $1::text as name', ['brianc']) + .then((res) => console.log(res.rows[0].name)) + .catch(err => console.error('Error executing query', err.stack)); + +pool.end(() => { + console.log('pool has ended'); +}); + +pool.end().then(() => console.log('pool has ended')); + +(async () => { + const client = await pool.connect(); + await client.query('SELECT NOW()'); + client.release(); +})(); diff --git a/types/pg/tsconfig.json b/types/pg/tsconfig.json index 3535f4d43f..caa997a916 100644 --- a/types/pg/tsconfig.json +++ b/types/pg/tsconfig.json @@ -4,9 +4,10 @@ "lib": [ "es6" ], + "target": "es6", "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" @@ -19,4 +20,4 @@ "index.d.ts", "pg-tests.ts" ] -} \ No newline at end of file +} diff --git a/types/pg/tslint.json b/types/pg/tslint.json new file mode 100644 index 0000000000..495d29983d --- /dev/null +++ b/types/pg/tslint.json @@ -0,0 +1,5 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + } +} diff --git a/types/pg/v6/index.d.ts b/types/pg/v6/index.d.ts new file mode 100644 index 0000000000..5624989ac7 --- /dev/null +++ b/types/pg/v6/index.d.ts @@ -0,0 +1,128 @@ +// Type definitions for pg 6.1 +// Project: https://github.com/brianc/node-postgres +// Definitions by: Phips Peter +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import events = require("events"); +import stream = require("stream"); +import pgTypes = require("pg-types"); + +export declare function connect(connection: string, callback: (err: Error, client: Client, done: (err?: any) => void) => void): void; +export declare function connect(config: ClientConfig, callback: (err: Error, client: Client, done: (err?: any) => void) => void): void; +export declare function end(): void; + +export interface ConnectionConfig { + user?: string; + database?: string; + password?: string; + port?: number; + host?: string; +} + +export interface Defaults extends ConnectionConfig { + poolSize?: number; + poolIdleTimeout?: number; + reapIntervalMillis?: number; + binary?: boolean; + parseInt8?: boolean; +} + +import { TlsOptions } from "tls"; + +export interface ClientConfig extends ConnectionConfig { + ssl?: boolean | TlsOptions; +} + +export interface PoolConfig extends ClientConfig { + // properties from module 'node-pool' + max?: number; + min?: number; + refreshIdle?: boolean; + idleTimeoutMillis?: number; + reapIntervalMillis?: number; + returnToHead?: boolean; + application_name?: string; + Promise?: PromiseConstructorLike; +} + +export interface QueryConfig { + name?: string; + text: string; + values?: any[]; +} + +export interface QueryResult { + command: string; + rowCount: number; + oid: number; + rows: any[]; +} + +export interface ResultBuilder extends QueryResult { + addRow(row: any): void; +} + +export declare class Pool extends events.EventEmitter { + // `new Pool('pg://user@localhost/mydb')` is not allowed. + // But it passes type check because of issue: + // https://github.com/Microsoft/TypeScript/issues/7485 + constructor(config?: PoolConfig); + + connect(): Promise; + connect(callback: (err: Error, client: Client, done: () => void) => void): void; + + end(callback?: () => void): Promise; + + query(queryStream: QueryConfig & stream.Readable): stream.Readable; + query(queryTextOrConfig: string | QueryConfig): Promise; + query(queryText: string, values: any[]): Promise; + + query(queryTextOrConfig: string | QueryConfig, callback: (err: Error, result: QueryResult) => void): Query; + query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): Query; + + on(event: "error", listener: (err: Error, client: Client) => void): this; + on(event: "connect" | "acquire", listener: (client: Client) => void): this; +} + +export declare class Client extends events.EventEmitter { + constructor(connection: string); + constructor(config: ClientConfig); + + connect(callback?: (err: Error) => void): void; + end(callback?: (err: Error) => void): void; + release(err?: Error): void; + + query(queryStream: QueryConfig & stream.Readable): stream.Readable; + query(queryTextOrConfig: string | QueryConfig): Promise; + query(queryText: string, values: any[]): Promise; + + query(queryTextOrConfig: string | QueryConfig, callback: (err: Error, result: QueryResult) => void): Query; + query(queryText: string, values: any[], callback: (err: Error, result: QueryResult) => void): Query; + + copyFrom(queryText: string): stream.Writable; + copyTo(queryText: string): stream.Readable; + + pauseDrain(): void; + resumeDrain(): void; + + on(event: "drain", listener: () => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "notification" | "notice", listener: (message: any) => void): this; + on(event: "end", listener: () => void): this; +} + +export declare class Query extends events.EventEmitter { + on(event: "row", listener: (row: any, result?: ResultBuilder) => void): this; + on(event: "error", listener: (err: Error) => void): this; + on(event: "end", listener: (result: ResultBuilder) => void): this; +} + +export declare class Events extends events.EventEmitter { + on(event: "error", listener: (err: Error, client: Client) => void): this; +} + +export const types: typeof pgTypes; + +export const defaults: Defaults & ClientConfig; diff --git a/types/pg/v6/pg-tests.ts b/types/pg/v6/pg-tests.ts new file mode 100644 index 0000000000..4b4cfba7ec --- /dev/null +++ b/types/pg/v6/pg-tests.ts @@ -0,0 +1,81 @@ +import * as pg from "pg"; + +var conString = "postgres://username:password@localhost/database"; + +// https://github.com/brianc/node-pg-types +pg.types.setTypeParser(20, val => Number(val)); + +// Client pooling +pg.defaults.ssl = true; +pg.connect(conString, (err, client, done) => { + if (err) { + return console.error("Error fetching client from pool", err); + } + client.query("SELECT $1::int AS number", ["1"], (err, result) => { + if (err) { + done(err); + return console.error("Error running query", err); + } + else { + done(); + } + console.log(result.rows[0]["number"]); + return null; + }); + return null; +}); + +// Simple +var client = new pg.Client(conString); +client.connect(err => { + if (err) { + return console.error("Could not connect to postgres", err); + } + client.query("SELECT NOW() AS 'theTime'", (err, result) => { + if (err) { + return console.error("Error running query", err); + } + console.log(result.rowCount); + console.log(result.rows[0]["theTime"]); + client.end(); + return null; + }); + return null; +}); +client.on('end', () => console.log("Client was disconnected.")); + +// client pooling + +var config = { + user: 'foo', //env var: PGUSER + database: 'my_db', //env var: PGDATABASE + password: 'secret', //env var: PGPASSWORD + port: 5432, //env var: PGPORT + max: 10, // max number of clients in the pool + idleTimeoutMillis: 30000, // how long a client is allowed to remain idle before being closed + Promise, +}; +var pool = new pg.Pool(config); + +pool.connect((err, client, done) => { + if(err) { + return console.error('error fetching client from pool', err); + } + client.query('SELECT $1::int AS number', ['1'], (err, result) => { + done(); + + if(err) { + return console.error('error running query', err); + } + console.log(result.rows[0].number); + }); +}); + +pool.on('error', (err, client) => { + console.error('idle client error', err.message, err.stack) +}) + +pool.end(); +pool.end(() => { + console.log("pool is closed"); +}); diff --git a/types/pg/v6/tsconfig.json b/types/pg/v6/tsconfig.json new file mode 100644 index 0000000000..2c44f5862b --- /dev/null +++ b/types/pg/v6/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "typeRoots": [ + "../../" + ], + "paths": { + "pg": [ "pg/v6" ] + }, + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pg-tests.ts" + ] +} diff --git a/types/picturefill/index.d.ts b/types/picturefill/index.d.ts new file mode 100644 index 0000000000..3c12117841 --- /dev/null +++ b/types/picturefill/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for picturefill 3.0 +// Project: https://scottjehl.github.io/picturefill/ +// Definitions by: Alexander Azarov +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare namespace Picturefill { + type ElementNullable = Element | null; + + interface EvaluateArg { + reevaluate?: boolean; + elements: NodeList | ElementNullable[]; + } +} + +declare function picturefill(arg?: Picturefill.EvaluateArg): void; + +export = picturefill; +export as namespace picturefill; diff --git a/types/picturefill/picturefill-tests.ts b/types/picturefill/picturefill-tests.ts new file mode 100644 index 0000000000..306a3f6ded --- /dev/null +++ b/types/picturefill/picturefill-tests.ts @@ -0,0 +1,17 @@ +function test_elements() { + // no args + picturefill(); + + // Element[] + picturefill({elements: [ document.getElementById('#id') ]}); + + // NodeList + picturefill({elements: document.querySelectorAll('img')}); +} + +function test_optional() { + picturefill({ + elements: [], + reevaluate: true + }); +} diff --git a/types/picturefill/tsconfig.json b/types/picturefill/tsconfig.json new file mode 100644 index 0000000000..0fefbd709d --- /dev/null +++ b/types/picturefill/tsconfig.json @@ -0,0 +1,23 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "dom", + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "picturefill-tests.ts" + ] +} diff --git a/types/picturefill/tslint.json b/types/picturefill/tslint.json new file mode 100644 index 0000000000..d88586e5bd --- /dev/null +++ b/types/picturefill/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} diff --git a/types/pngjs/index.d.ts b/types/pngjs/index.d.ts new file mode 100644 index 0000000000..ece3434de1 --- /dev/null +++ b/types/pngjs/index.d.ts @@ -0,0 +1,100 @@ +// Type definitions for pngjs 3.3 +// Project: https://github.com/lukeapage/pngjs +// Definitions by: Jason Cheatham +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +import { Duplex } from 'stream'; +import { createDeflate } from 'zlib'; + +export class PNG extends Duplex { + static adjustGamma(src: PNG): void; + + static bitblt( + src: PNG, + dst: PNG, + srcX?: number, + srcY?: number, + width?: number, + height?: number, + deltaX?: number, + deltaY?: number + ): void; + + static sync: { + read(buffer: Buffer, options?: ParserOptions): PNG; + write(buffer: Buffer, options?: PackerOptions): PNG; + }; + + constructor(options?: PNGOptions); + + data: Buffer; + gamma: number; + height: number; + width: number; + + adjustGamma(): void; + + bitblt( + dst: PNG, + srcX?: number, + srcY?: number, + width?: number, + height?: number, + deltaX?: number, + deltaY?: number + ): PNG; + + on(event: 'metadata', callback: (metadata: Metadata) => void): this; + on(event: 'parsed', callback: (data: Buffer) => void): this; + on(event: 'error', callback: (error: Error) => void): this; + on(event: string, callback: (...args: any[]) => void): this; + + pack(): PNG; + + parse(data: string | Buffer, callback?: (error: Error, data: PNG) => void): PNG; +} + +export interface BaseOptions { + width?: number; + height?: number; + fill?: boolean; +} + +export interface ParserOptions { + checkCRC?: boolean; +} + +export interface PackerOptions { + deflateChunkSize?: number; + deflateLevel?: number; + deflateStrategy?: number; + deflateFactory?: typeof createDeflate; + colorType?: ColorType; + bitDepth?: 8 | 16; + bgColor?: { + red: number; + green: number; + blue: number; + }; + inputHasAlpha?: boolean; + inputColorType?: ColorType; + filterType?: number | number[]; +} + +export type PNGOptions = BaseOptions & ParserOptions & PackerOptions; + +export type ColorType = 0 | 1 | 2 | 4; + +export interface Metadata { + width: number; + height: number; + depth: 1 | 2 | 4 | 8 | 16; + interlace: boolean; + palette: boolean; + color: boolean; + alpha: boolean; + bpp: 1 | 2 | 3 | 4; + colorType: ColorType; +} diff --git a/types/pngjs/pngjs-tests.ts b/types/pngjs/pngjs-tests.ts new file mode 100644 index 0000000000..28b1efd733 --- /dev/null +++ b/types/pngjs/pngjs-tests.ts @@ -0,0 +1,68 @@ +import { PNG } from 'pngjs'; +import { createDeflate } from 'zlib'; + +const pngs = [ + new PNG(), + new PNG({}), + new PNG({ width: 1 }), + new PNG({ checkCRC: false }), + new PNG({ deflateChunkSize: 3 }), + new PNG({ + width: 1, + height: 1, + fill: false, + checkCRC: true, + deflateChunkSize: 1, + deflateLevel: 1, + deflateStrategy: 1, + deflateFactory: createDeflate, + colorType: 4, + bitDepth: 8, + inputHasAlpha: false, + filterType: 4 + }), + new PNG({ filterType: [1, 2, 3] }) +]; + +const png = pngs[0]; + +if (png.readable) { + console.log('readable'); +} +if (png.writable) { + console.log('writable'); +} +png.width === 1; +png.height === 1; +png.gamma === 1; +png.adjustGamma(); + +png.bitblt(pngs[1]); +png.bitblt(pngs[1], 1); +png.bitblt(pngs[1], 1, 1); +png.bitblt(pngs[1], 1, 1, 1, 1, 1, 1); + +png.on('metadata', metadata => { + metadata.bpp === 1; +}); +png.on('parsed', data => { + data.byteLength === 1; +}); +png.on('error', error => { + error === new Error('testing'); +}); +png.on('foo', () => {}); + +png.pack().adjustGamma(); + +png.parse('foo').adjustGamma(); +png.parse(Buffer.from('foo')).adjustGamma(); +png.parse('foo', (error, data) => { + error.stack; + data.adjustGamma(); +}).adjustGamma(); + +PNG.adjustGamma(png); + +PNG.bitblt(png, pngs[1]); +PNG.bitblt(png, pngs[1], 1, 1, 1, 1, 1, 1); diff --git a/types/pngjs/tsconfig.json b/types/pngjs/tsconfig.json new file mode 100644 index 0000000000..bdce83e9a2 --- /dev/null +++ b/types/pngjs/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "pngjs-tests.ts" + ] +} diff --git a/types/pngjs/tslint.json b/types/pngjs/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/pngjs/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } diff --git a/types/postmark/tslint.json b/types/postmark/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/postmark/tslint.json +++ b/types/postmark/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-fruitdown/tslint.json b/types/pouchdb-adapter-fruitdown/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-fruitdown/tslint.json +++ b/types/pouchdb-adapter-fruitdown/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-http/tslint.json b/types/pouchdb-adapter-http/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-http/tslint.json +++ b/types/pouchdb-adapter-http/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-idb/tslint.json b/types/pouchdb-adapter-idb/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-idb/tslint.json +++ b/types/pouchdb-adapter-idb/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-leveldb/tslint.json b/types/pouchdb-adapter-leveldb/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-leveldb/tslint.json +++ b/types/pouchdb-adapter-leveldb/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-localstorage/tslint.json b/types/pouchdb-adapter-localstorage/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-localstorage/tslint.json +++ b/types/pouchdb-adapter-localstorage/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-memory/tslint.json b/types/pouchdb-adapter-memory/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-memory/tslint.json +++ b/types/pouchdb-adapter-memory/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-adapter-websql/tslint.json b/types/pouchdb-adapter-websql/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-adapter-websql/tslint.json +++ b/types/pouchdb-adapter-websql/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-core/tslint.json b/types/pouchdb-core/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-core/tslint.json +++ b/types/pouchdb-core/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/pouchdb-upsert/tslint.json b/types/pouchdb-upsert/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/pouchdb-upsert/tslint.json +++ b/types/pouchdb-upsert/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/prettier/index.d.ts b/types/prettier/index.d.ts index 48c89a5c57..317a514912 100644 --- a/types/prettier/index.d.ts +++ b/types/prettier/index.d.ts @@ -115,6 +115,9 @@ export interface ResolveConfigOptions { * The promise will be rejected if there was an error parsing the configuration file. */ export function resolveConfig(filePath?: string, options?: ResolveConfigOptions): Promise; +export namespace resolveConfig { + function sync(filePath?: string, options?: ResolveConfigOptions): null | Options; +} /** * As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache. diff --git a/types/prettier/prettier-tests.ts b/types/prettier/prettier-tests.ts index a51e8902c4..8d95196101 100644 --- a/types/prettier/prettier-tests.ts +++ b/types/prettier/prettier-tests.ts @@ -24,4 +24,9 @@ prettier.resolveConfig('path/to/somewhere').then(options => { } }); +const options = prettier.resolveConfig.sync('path/to/somewhere'); +if (options !== null) { + const formatted = prettier.format('hello world', options); +} + prettier.clearConfigCache(); diff --git a/types/prismjs/index.d.ts b/types/prismjs/index.d.ts index 5ed442c46f..1476f56291 100644 --- a/types/prismjs/index.d.ts +++ b/types/prismjs/index.d.ts @@ -5,11 +5,6 @@ export as namespace Prism; -/** - * @deprecated Use the Prism namespace directly directly - */ -export as namespace PrismJS; - export const util: Util; export const languages: Languages; export const plugins: any; diff --git a/types/prosemirror-collab/tslint.json b/types/prosemirror-collab/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/prosemirror-collab/tslint.json +++ b/types/prosemirror-collab/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/prosemirror-commands/index.d.ts b/types/prosemirror-commands/index.d.ts index 9309a0522f..3020dcaabc 100644 --- a/types/prosemirror-commands/index.d.ts +++ b/types/prosemirror-commands/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for prosemirror-commands 0.21 +// Type definitions for prosemirror-commands 0.22 // Project: https://github.com/ProseMirror/prosemirror-commands // Definitions by: Bradley Ayers // David Hahn @@ -11,6 +11,8 @@ import { EditorView } from 'prosemirror-view'; export function deleteSelection(state: EditorState, dispatch?: (tr: Transaction) => void): boolean; export function joinBackward(state: EditorState, dispatch?: (tr: Transaction) => void, view?: EditorView): boolean; +export function selectNodeBackward(state: EditorState, dispatch?: (tr: Transaction) => void, view?: EditorView): boolean; +export function selectNodeForward(state: EditorState, dispatch?: (tr: Transaction) => void, view?: EditorView): boolean; export function joinForward(state: EditorState, dispatch?: (tr: Transaction) => void, view?: EditorView): boolean; export function joinUp(state: EditorState, dispatch?: (tr: Transaction) => void): boolean; export function joinDown(state: EditorState, dispatch?: (tr: Transaction) => void): boolean; diff --git a/types/prosemirror-history/tslint.json b/types/prosemirror-history/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/prosemirror-history/tslint.json +++ b/types/prosemirror-history/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/prosemirror-keymap/tslint.json b/types/prosemirror-keymap/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/prosemirror-keymap/tslint.json +++ b/types/prosemirror-keymap/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/prosemirror-state/tslint.json b/types/prosemirror-state/tslint.json index 6371e80ee3..0aca9484b9 100644 --- a/types/prosemirror-state/tslint.json +++ b/types/prosemirror-state/tslint.json @@ -3,6 +3,7 @@ "rules": { // TODO "no-object-literal-type-assertion": false, + "no-any-union": false, "no-unnecessary-generics": false } } diff --git a/types/ramda/index.d.ts b/types/ramda/index.d.ts index f437464da3..da91603caf 100644 --- a/types/ramda/index.d.ts +++ b/types/ramda/index.d.ts @@ -422,8 +422,8 @@ declare namespace R { * the list. Note that all keys are coerced to strings because of how * JavaScript objects work. */ - countBy(fn: (a: any) => string | number, list: any[]): any; - countBy(fn: (a: any) => string | number): (list: any[]) => any; + countBy(fn: (a: T) => string | number, list: T[]): { [index: string]: number }; + countBy(fn: (a: T) => string | number): (list: T[]) => { [index: string]: number }; /** * Returns a curried equivalent of the provided function. The curried function has two unusual capabilities. @@ -1588,7 +1588,7 @@ declare namespace R { /** * Sorts the list according to a key generated by the supplied function. */ - sortBy(fn: (a: any) => Ord, list: T[]): T[]; + sortBy(fn: (a: T) => Ord, list: T[]): T[]; sortBy(fn: (a: any) => Ord): (list: T[]) => T[]; /** @@ -1917,7 +1917,7 @@ declare namespace R { * Note that the order of the output array is not guaranteed across * different JS platforms. */ - values(obj: { [index: string]: T } | any): T[]; + values(obj: T): Array; /** * Returns a list of all the properties, including prototype properties, of the supplied diff --git a/types/ramda/ramda-tests.ts b/types/ramda/ramda-tests.ts index 38806fb3b4..eae917d93e 100644 --- a/types/ramda/ramda-tests.ts +++ b/types/ramda/ramda-tests.ts @@ -1567,7 +1567,19 @@ class Rectangle { }; () => { - const a = R.values({a: 1, b: 2, c: 3}); // => [1, 2, 3] + interface A { + a: string; + b: string; + } + const a1: A = { a: 'something', b: 'else' }; + const v1 = R.values(a1); + + const a = R.values({a: 1, b: 2, c: 3}); // => [1, 2, 3] (number[]) + const addition = a[0] + a[1]; + + const b = R.values({a: 1, b: 'something'}); // b = (string|number)[] + const c = R.values({1: 3}); + // const d = R.values('something'); }; () => { diff --git a/types/ramda/tslint.json b/types/ramda/tslint.json index 6356421ec0..efa861d7ff 100644 --- a/types/ramda/tslint.json +++ b/types/ramda/tslint.json @@ -1,6 +1,7 @@ { "extends": "dtslint/dt.json", "rules": { - "no-construct": false // Required for R.is function testing + "no-construct": false, // Required for R.is function testing + "no-any-union": false } } diff --git a/types/rc-tooltip/index.d.ts b/types/rc-tooltip/index.d.ts index c24f0018fd..20f65e3059 100644 --- a/types/rc-tooltip/index.d.ts +++ b/types/rc-tooltip/index.d.ts @@ -5,9 +5,11 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -/// +import * as React from 'react'; -declare namespace Tooltip { +export as namespace RCTooltip; + +declare namespace RCTooltip { export type Trigger = "hover" | "click" | "focus"; export type Placement = "left" | "right" | "top" | "bottom" | @@ -34,8 +36,4 @@ declare namespace Tooltip { } } -declare class Tooltip extends React.Component {} - -declare module "rc-tooltip" { - export = Tooltip -} +export default class Tooltip extends React.Component {} diff --git a/types/rc-tooltip/rc-tooltip-tests.tsx b/types/rc-tooltip/rc-tooltip-tests.tsx index 832a292e97..06b230a55b 100644 --- a/types/rc-tooltip/rc-tooltip-tests.tsx +++ b/types/rc-tooltip/rc-tooltip-tests.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import * as ReactDOM from 'react-dom'; -import * as Tooltip from 'rc-tooltip'; +import Tooltip, {RCTooltip} from 'rc-tooltip'; ReactDOM.render( tooltip}> @@ -50,3 +50,9 @@ ReactDOM.render( , document.querySelector('.another-app') ); + +const props: RCTooltip.Props = { + placement: "bottomRight", + trigger: ['click', 'focus'], + overlay: () => tooltip, +}; diff --git a/types/react-bootstrap-table/index.d.ts b/types/react-bootstrap-table/index.d.ts index 1b80e670fa..a31d860775 100644 --- a/types/react-bootstrap-table/index.d.ts +++ b/types/react-bootstrap-table/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for react-bootstrap-table v2.6.0 // Project: https://github.com/AllenFang/react-bootstrap-table -// Definitions by: Frank Laub , Aleksander Lode +// Definitions by: Frank Laub , Aleksander Lode , Josué Us // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -12,48 +12,115 @@ import { ComponentClass, Props, ReactElement } from 'react'; import { EventEmitter } from 'events'; +/** + * Interface spec for sepcifying functionality to handle remotely + * + * Consult [documentation](https://allenfang.github.io/react-bootstrap-table/docs.html#remote) + * for more info + * + * @interface RemoteObjSpec + */ +export interface RemoteObjSpec { + /** + * If set, cell edits will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + cellEdit?: boolean; + /** + * If set insertions will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + insertRow?: boolean; + /** + * If set deletion will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + dropRow?: boolean; + /** + * If set filters will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + filter?: boolean; + /** + * If set search will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + search?: boolean; + /** + * If set, exporting CSV will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + exportCSV?: boolean; + /** + * If set sorting will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + sort?: boolean; + /** + * If set pagination will be handled remotely + * + * @type {boolean} + * @memberof RemoteObjSpec + */ + pagination?: boolean; +} + export interface BootstrapTableProps extends Props { /** Use data to specify the data that you want to display on table. */ - data: any[]; + data: any[]; /** If set, data is remote (use also fetchInfo) */ - remote?: boolean, + remote?: (remobeObj: RemoteObjSpec) => RemoteObjSpec | boolean, // Updated to support ^3.0.0 /** Use keyField to tell table which column is unique. This is same as isKey in Tips: You need choose one configuration to set key field: keyField or isKey in */ - keyField?: string; + keyField?: string; /** Use height to set the height of table, default is 100%. */ - height?: string; + height?: string; /** Set the max column width (pixels) */ - maxHeight?: string; + maxHeight?: string; /** Enable striped by setting striped to true. Same as Bootstrap table class .table-striped, default is false. */ - striped?: boolean; + striped?: boolean; /** Enable hover by setting hover to true. Same as Bootstrap table class .table-hover, default is false. */ - hover?: boolean; + hover?: boolean; /** Enable condensed by setting condensed to true. Same as Bootstrap table class .table-condensed, default is false. */ - condensed?: boolean; + condensed?: boolean; /** Become a borderless table by setting bordered to false, default is true. */ - bordered?: boolean; + bordered?: boolean; /** Enable pagination by setting pagination to true, default is false. */ - pagination?: boolean; + pagination?: boolean; /** Assign the class name of row(tr). This attribute accept a string or function and function is a better way to do more customization. If a string given, means the value will be presented as the row class. @@ -63,65 +130,65 @@ export interface BootstrapTableProps extends Props { return rowIndex%2==0?"tr-odd":"tr-even"; //return a class name. } */ - trClassName?: string | ((rowData: any, rowIndex: number) => string); + trClassName?: string | ((rowData: any, rowIndex: number) => string); /** Enable row insertion by setting insertRow to true, default is false. If you enable row insertion, there's a button on the upper left side of table. */ - insertRow?: boolean; + insertRow?: boolean; /** Enable row deletion by setting deleteRow to true, default is false. If you enable row deletion, there's a button on the upper left side of table. */ - deleteRow?: boolean; + deleteRow?: boolean; /** Enable column filter by setting columnFilter to true, default is false. If enabled, there're input text field per column under the table, user can input your filter condition by each column. */ - columnFilter?: boolean; + columnFilter?: boolean; /** Enable search by setting search to true, default is false. If enabled, there is a on the upper left side of the table. The default place holder is Search */ - search?: boolean; + search?: boolean; /** Set searchPlaceholder to change the placeholder in search field, default is Search. */ - searchPlaceholder?: string; + searchPlaceholder?: string; /** Enable multi search by multiColumnSearch, default is false. If you want to use multi search, you must enable search at first. Tips: Use space to delimited search text. EX: 3 4, which means match all 3 or 4 datas in table. */ - multiColumnSearch?: boolean; + multiColumnSearch?: boolean; /** Enable export csv function, default is false. If you enable, there's a button on the upper left side of table. */ - exportCSV?: boolean; + exportCSV?: boolean; /** Set CSV filename (e.g. items.csv). Default is spreadsheet.csv */ - csvFileName?: string; + csvFileName?: string; /** Enable row selection on table. selectRow accept an object which have the following properties */ - selectRow?: SelectRow; + selectRow?: SelectRow; /** Enable cell editing on table. cellEdit accept an object which have the following properties */ - cellEdit?: CellEdit; + cellEdit?: CellEdit; /** For some options setting on this component, you can set the options attribute and give an object which contain following properties */ - options?: Options; - fetchInfo?: FetchInfo; + options?: Options; + fetchInfo?: FetchInfo; printable?: boolean; - tableStyle?: any; - containerStyle?: any; - headerStyle?: any; - bodyStyle?: any; - ignoreSinglePage?: boolean; + tableStyle?: any; + containerStyle?: any; + headerStyle?: any; + bodyStyle?: any; + ignoreSinglePage?: boolean; containerClass?: string; tableContainerClass?: string headerContainerClass?: string; @@ -136,37 +203,37 @@ export interface SelectRow { /** For specifing the selection is single(radio) or multiple(checkbox). */ - mode: SelectRowMode; + mode: SelectRowMode; /** Click the row will trigger selection on that row if enable clickToSelect, default is false. */ - clickToSelect?: boolean; + clickToSelect?: boolean; /** If true, click the row will trigger selection on that row and also trigger cell editing if you enabled cell edit. Default is false. */ - clickToSelectAndEditCell?: boolean; + clickToSelectAndEditCell?: boolean; /** You can assign the background color of row which be selected. */ - bgColor?: string; + bgColor?: string; /** You can assign the class name of row which be selected. */ - className?: string; + className?: string; /** Give an array data to perform which rows you want to be selected when table loading. The content of array should be the rowkey which you want to be selected. */ - selected?: string[] | number[]; + selected?: string[] | number[]; /** if true, the radio/checkbox column will be hide. You can enable this attribute if you enable clickToSelect and you don't want to show the selection column. */ - hideSelectColumn?: boolean; + hideSelectColumn?: boolean; /** Default is false, if enabled, there will be a button on top of table for toggling selected rows only. */ - showOnlySelected?: boolean; + showOnlySelected?: boolean; /** Accept a custom callback function, if a row be selected or unselected, this function will be called. This callback function taking three arguments row, isSelected and event: @@ -175,7 +242,7 @@ export interface SelectRow { `event`: The event target object. If return value of this (function) is false, the select or deselect action will not be applied. */ - onSelect?: (row: any, isSelected: Boolean, event: any) => boolean; + onSelect?: (row: any, isSelected: Boolean, event: any) => boolean; /** Accept a custom callback function, if click select all checkbox, this function will be called. This callback function taking two arguments isSelected and currentSelectedAndDisplayData: @@ -183,7 +250,7 @@ export interface SelectRow { `currentSelectedAndDisplayData`: If pagination enabled, this result is the data which in a page. In contrast, this is all data in table. If return value of this function is false, the select all or deselect all action will not be applied. */ - onSelectAll?: (isSelected: boolean, currentSelectedAndDisplayData: any) => boolean; + onSelectAll?: (isSelected: boolean, currentSelectedAndDisplayData: any) => boolean; /** * Provide a list of unselectable row keys. @@ -197,23 +264,23 @@ export interface CellEdit { /** To spectify which condition will trigger cell editing.(click or dbclick) */ - mode: CellEditClickMode; + mode: CellEditClickMode; /** Enable blurToSave will trigger a saving event on cell when mouse blur on the input field. Default is false. In the default condition, you need to press ENTER to save the cell. */ - blurToSave?: boolean; + blurToSave?: boolean; /** Accept a custom callback function, before cell saving, this function will be called. This callback function taking three arguments:row, cellName and cellValue It's necessary to return a bool value which whether apply this cell editing. */ - beforeSaveCell?: (row: any, cellName: string, cellValue: any) => boolean; + beforeSaveCell?: (row: any, cellName: string, cellValue: any) => boolean; /** Accept a custom callback function, after cell saving, this function will be called. This callback function taking three arguments:row, cellName and cellValue */ - afterSaveCell?: (row: any, cellName: string, cellValue: any) => void; + afterSaveCell?: (row: any, cellName: string, cellValue: any) => void; } export type SortOrder = 'asc' | 'desc'; @@ -222,137 +289,137 @@ export interface Options { /** Manage sort field by yourself */ - sortName?: string; + sortName?: string; /** Manage sort order by yourself */ - sortOrder?: SortOrder; + sortOrder?: SortOrder; /** Assign a default sort field. */ - defaultSortName?: string; + defaultSortName?: string; /** Assign a default sort ordering. */ - defaultSortOrder?: SortOrder; + defaultSortOrder?: SortOrder; /** False to disable sort indicator on header column, default is true. */ - sortIndicator?: boolean; + sortIndicator?: boolean; /** Change the displaying text on table if data is empty. */ - noDataText?: string | ReactElement; + noDataText?: string | ReactElement; /** A delay for trigger search after a keyup (millisecond) */ - searchDelayTime?: number; + searchDelayTime?: number; /** A custom text on export csv button */ - exportCSVText?: string; + exportCSVText?: string; /** Default is false, if true means you want to ignore any editable configuration when row insert. */ - ignoreEditable?: boolean; + ignoreEditable?: boolean; /** Only work on enable search. If true, there will be a button beside search input field for clear search field text. */ - clearSearch?: boolean; + clearSearch?: boolean; /** Assign a callback function which will be called after table update. */ - afterTableComplete?: Function; + afterTableComplete?: Function; /** Assign a callback function which will be called after row delete. This function taking one argument: rowKeys, which means the row key you dropped. */ - afterDeleteRow?: (rowKeys: string[]) => void; + afterDeleteRow?: (rowKeys: string[]) => void; /** Assign a callback function which will be called after row insert. This function taking one argument: row, which means the whole row data you added. */ - afterInsertRow?: (row: any) => void; + afterInsertRow?: (row: any) => void; /** Customize the text of previouse page button */ - prePage?: string; + prePage?: string; /** Customize the text of next page button */ - nextPage?: string; + nextPage?: string; /** Customize the text of first page button */ - firstPage?: string; + firstPage?: string; /** Customize the text of last page button */ - lastPage?: string; + lastPage?: string; /** Accept a number, which means the page you want to show as default. */ - page?: number; + page?: number; /** You can change the dropdown list for size per page if you enable pagination. */ - sizePerPageList?: number[]; + sizePerPageList?: number[]; /** Means the size per page you want to locate as default. */ - sizePerPage?: number; + sizePerPage?: number; /** To define the pagination bar length, default is 5. */ - paginationSize?: number; + paginationSize?: number; /** To define where to start counting the pages. */ - pageStartIndex?: number; + pageStartIndex?: number; /** Assign a callback function which will be called after page changed. This function taking two argument: page and sizePerPage. `page`: Current page. `sizePerPage`: The data size which in one page. */ - onPageChange?: (page: number, sizePerPage: number) => void; + onPageChange?: (page: number, sizePerPage: number) => void; /** Assign a callback function which will be called after size per page dropdown changed. This function taking one argument: sizePerPage. `sizePerPage`: The data size which in one page. */ - onSizePerPageList?: (sizePerPage: number) => void; + onSizePerPageList?: (sizePerPage: number) => void; /** Assign a callback function which will be called after trigger sorting. This function taking two argument: `sortName` and `sortOrde`r. `sortName`: The sort column name `sortOrder`: The sort ordering. */ - onSortChange?: (sortName: string, sortOrder: SortOrder) => void; + onSortChange?: (sortName: string, sortOrder: SortOrder) => void; /** Assign a callback function which will be called after trigger searching. This function taking two argument: search and result. `search`: The search text which user input. `result`: The results after searching. */ - afterSearch?: (search: string, result: any) => void; + afterSearch?: (search: string, result: any) => void; /** Assign a callback function which will be called after trigger column filtering. This function taking two argument: filterConds and result. `filterConds`: It's an array object which contain all column filter conditions. `result`: The results after filtering. */ - afterColumnFilter?: (filterConds: any[], result: any) => void; + afterColumnFilter?: (filterConds: any[], result: any) => void; /** Assign a callback function which will be called after a row click. This function taking one argument: row which is the row data which you click on. */ - onRowClick?: (row: any) => void; + onRowClick?: (row: any) => void; /** Assign a callback function which will be called after a row double click. This function taking one argument: row which is the row data which you double click on. */ - onRowDoubleClick?: (row:any)=>void; + onRowDoubleClick?: (row: any) => void; /** Background color on expanded rows. */ @@ -360,21 +427,21 @@ export interface Options { /** Assign a callback function which will be called when mouse enter into the table. */ - onMouseEnter?: Function; + onMouseEnter?: Function; /** Assign a callback function which will be called when mouse leave from the table. */ - onMouseLeave?: Function; + onMouseLeave?: Function; /** Assign a callback function which will be called when mouse over a row in table. This function taking one argument: row which is the row data which mouse over. */ - onRowMouseOver?: Function; + onRowMouseOver?: Function; /** Assign a callback function which will be called when mouse leave from a row in table. This function taking one argument: row which is the row data which mouse out. */ - onRowMouseOut?: Function; + onRowMouseOut?: Function; /** Assign a callback function which will be called when row dropping. @@ -385,60 +452,93 @@ export interface Options { `rowKeys` is the row keys which been deleted, you can call next function to apply this deletion. */ - handleConfirmDeleteRow?: (next: Function, rowKeys: any[]) => void; - paginationShowsTotal?: boolean | ReactElement; - onSearchChange?: Function; - onAddRow?: Function; - onExportToCSV?: Function; + handleConfirmDeleteRow?: (next: Function, rowKeys: any[]) => void; + paginationShowsTotal?: boolean | ReactElement; + onSearchChange?: Function; + onAddRow?: Function; + onExportToCSV?: Function; - insertText?: string; - deleteText?: string; - saveText?: string; - closeText?: string; + insertText?: string; + deleteText?: string; + saveText?: string; + closeText?: string; + // Customization properties + /** + * Callback function to be called when a cell is modified + * + * https://allenfang.github.io/react-bootstrap-table/example.html#remote + * + * @memberof BootstrapTableProps + */ + onCellEdit?: (row: any, field: string, value: any) => any; + /** + * Callback function to be called when filter changing + * + * https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/remote/remote-store-filtering.js#L67 + * + * @memberof BootstrapTableProps + */ + onFilterChange?:(filterObj: any) => any; + /** + * Callback function which will be called when a row will be deleted + * + * https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/remote/remote-store-delete-row.js#L27 + * + * @memberof BootstrapTableProps + */ + onDeleteRow?: (rows: any[] | any) => any; + /** + * A callback which will be called after page changed + * + * https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/remote/remote-store-paging.js#L30 + * + * @memberof BootstrapTableProps + */ + onpageChange?: (page: any, sizePerPage: number) => any; } interface FetchInfo { - dataTotalSize?: number; + dataTotalSize?: number; } export interface BootstrapTable extends ComponentClass { /** * Call this function to insert an new row to table. */ - handleAddRow(row: any): void; + handleAddRow(row: any): void; /** * Call this function to insert an new row as first row on table. */ - handleAddRowAtBegin(row: any): void; + handleAddRowAtBegin(row: any): void; /** * Call this function to drop rows in table. */ - handleDropRow(rowKeys: any[]): void; + handleDropRow(rowKeys: any[]): void; /** * Call this function to do column filtering on table. */ - handleFilterData(filter: any): void; + handleFilterData(filter: any): void; /** * Call this function with search text for fully searching. */ - handleSearch(search: string): void; + handleSearch(search: string): void; /** * Call this function to sort table. */ - handleSort(order: SortOrder, field: string): void; + handleSort(order: SortOrder, field: string): void; /** * Call this function to get the page by a rowkey */ - getPageByRowKey(rowKey: string): any; + getPageByRowKey(rowKey: string): any; /** * Call this function to export table as csv. */ - handleExportCSV(): void; + handleExportCSV(): void; /** * Clean all the selection state on table. */ - cleanSelected(): void; + cleanSelected(): void; } interface BootstrapTable extends ComponentClass { } declare const BootstrapTable: BootstrapTable; @@ -448,20 +548,20 @@ export interface TableHeaderColumnProps extends Props { /** The field of data you want to show on column. */ - dataField?: string; + dataField?: string; /** Use isKey to tell table which column is unique. This is same as keyField in Tips: You need choose one configuration to set key field: isKey or keyField in */ - isKey?: boolean; + isKey?: boolean; /** Set the column width. ex: 150, it's means 150px */ - width?: string; + width?: string; /** Set align in column, value is left, center, right, start and end. */ - dataAlign?: DataAlignType; + dataAlign?: DataAlignType; /** * Alignment of text in the column header. @@ -470,7 +570,7 @@ export interface TableHeaderColumnProps extends Props { /** True to enable table sorting. Default is disabled. */ - dataSort?: boolean; + dataSort?: boolean; /** Default search string. */ @@ -479,27 +579,27 @@ export interface TableHeaderColumnProps extends Props { Allow user to render a custom sort caret. You should give a function and should return a JSX. This function taking one arguments: order which present the sort order currently. */ - caretRender?: Function; - /** - Give an Object like following to able to customize your own editing component. - This Object should contain these two property: - getElement(REQUIRED): Accept a callback function and take two arguments: onUpdate and props. - customEditorParameters: Another extra data for custom cell edit component. - */ - customEditor?: {getElement: (onUpdate: any, props: any) => ReactElement, customEditorParameters?: Object} ; + caretRender?: Function; + /** + Give an Object like following to able to customize your own editing component. + This Object should contain these two property: + getElement(REQUIRED): Accept a callback function and take two arguments: onUpdate and props. + customEditorParameters: Another extra data for custom cell edit component. + */ + customEditor?: { getElement: (onUpdate: any, props: any) => ReactElement, customEditorParameters?: Object }; /** To customize the column. This callback function should return a String or a React Component. In addition, this function taking two argument: cell and row. */ - dataFormat?: (cell: any, row: any, formatExtraData?: any) => string | ReactElement; + dataFormat?: (cell: any, row: any, formatExtraData?: any) => string | ReactElement; /** To to enable search or filter data on formatting. Default is false */ - filterFormatted?: boolean; + filterFormatted?: boolean; /** True to hide column. */ - hidden?: boolean; + hidden?: boolean; /** True to hide the dropdown for sizePerPage. */ @@ -507,28 +607,28 @@ export interface TableHeaderColumnProps extends Props { /** False to disable search functionality on column, default is true. */ - searchable?: boolean; + searchable?: boolean; /** Give a customize function for data sorting. This function taking four arguments: a, b, order, sortField, extraData */ - sortFunc?: (a: any, b: any, order: SortOrder, sortField: any, extraData: any) => number; + sortFunc?: (a: any, b: any, order: SortOrder, sortField: any, extraData: any) => number; /** It's a extra data for custom sort function, if defined, this data will be pass as fifth argument in sortFunc. */ - sortFuncExtraData?: any; + sortFuncExtraData?: any; /** Add custom css class on table header column, this attribute only accept String or Function. If Function, it taking four arguments: cell, row, rowIndex, columnIndex. In addition, this function should return a String which is the class name you want to add on. */ - className?: string | ((cell: any, row: any, rowIndex: number, columnIndex: number) => string); + className?: string | ((cell: any, row: any, rowIndex: number, columnIndex: number) => string); /** Add custom css class on table body column, this attribute only accept String or Function. If Function, it taking four arguments: cell, row, rowIndex, columnIndex. In addition, this function should return a String which is the class name you want to add on. */ - columnClassName?: String | ((cell: any, row: any, rowIndex: number, columnIndex: number) => string); + columnClassName?: String | ((cell: any, row: any, rowIndex: number, columnIndex: number) => string); /** Add True to set column editable, false is non-editable. If give Object, you can do more customization when editing cell. This object have following properties: @@ -541,29 +641,29 @@ export interface TableHeaderColumnProps extends Props { } } */ - editable?: boolean | Editable; + editable?: boolean | Editable; /** It only work when you enable insertRow and be assign on rowKey column. If true, the row key will be generated automatically after a row insertion. */ - autoValue?: boolean; + autoValue?: boolean; /** To Enable a column filter within header column. This feature support a lots of filter type and condition. Please check example Following is the format for filter */ - filter?: Filter; + filter?: Filter; - onSort?: Function; + onSort?: Function; /** * Header for column in generated CSV file */ csvHeader?: string; - csvFormat?: Function; - columnTitle?: boolean; - sort?: SortOrder; - formatExtraData?: any; + csvFormat?: Function; + columnTitle?: boolean; + sort?: SortOrder; + formatExtraData?: any; /** * Row in the header on which this header column present. @@ -581,26 +681,32 @@ export interface TableHeaderColumnProps extends Props { * Default: 1 */ colSpan?: number; + + /** + * Return the value you want to be filtered on that column. + * It's useful if your column data is an object. + */ + filterValue?: Function; } export interface Editable { - type?: string;//edit type, avaiable value is textarea, select, checkbox + type?: string;//edit type, avaiable value is textarea, select, checkbox /** function for validation and taking only one "cell value" as argument. This function should return Bool. */ - validator?: (cell: any) => boolean; + validator?: (cell: any) => boolean; /** { values: //values means data in select or checkbox.If checkbox, use ':'(colon) to separate value, ex: Y:N } */ - options?: any; + options?: any; /** Configuration for the textarea editable type */ - cols?: number; - rows?: number; + cols?: number; + rows?: number; } export type SetFilterCallback = (targetValue: any) => boolean; export interface ApplyFilterParameter { @@ -612,51 +718,51 @@ export interface Filter { /** "TextFilter"||"SelectFilter"||"NumberFilter"||"DateFilter"||"RegexFilter"||"YOUR_CUSTOM_FILTER" */ - type?: FilterType; + type?: FilterType; /** * Default value on filter. If type is NumberFilter or DateFilter, this value will like { number||date: xxx, comparator: '>' } */ - defaultValue?: any; + defaultValue?: any; /** * Assign a millisecond for delay when trigger filtering, default is 500. */ - delay?: number; + delay?: number; /** * Only work on TextFilter. Assign the placeholder text on text and regex filter */ - placeholder?: string | RegExp; + placeholder?: string | RegExp; /** * Only work on NumberFilter. Accept an array which conatin the filter condition, like: ['<','>','='] */ - numberComparators?: string[]; + numberComparators?: string[]; /** * Options for the filter. */ - options?: any; + options?: any; /** * Comparison condition for the NumberFilter */ - condition?: string; + condition?: string; /** * Get element which represent filter. */ - getElement?: (filterHandler: (parameters?: ApplyFilterParameter) => void, filterParameters: any) => JSX.Element; + getElement?: (filterHandler: (parameters?: ApplyFilterParameter) => void, filterParameters: any) => JSX.Element; /** * Parameters for custom filter */ - customFilterParameters?: any; + customFilterParameters?: any; } export interface TableHeaderColumn extends ComponentClass { } declare const TableHeaderColumn: TableHeaderColumn; declare class TableDataSet extends EventEmitter { - constructor(data: any); - setData(data: any): void; - clear(): void; - getData(): any; + constructor(data: any); + setData(data: any): void; + clear(): void; + getData(): any; } diff --git a/types/react-bootstrap-table/react-bootstrap-table-tests.tsx b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx index e501d8de14..76e5bb79b7 100644 --- a/types/react-bootstrap-table/react-bootstrap-table-tests.tsx +++ b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx @@ -21,10 +21,10 @@ function priceFormatter(cell: any, row: any) { render( - Product ID - Product Name - Product Price - , + Product ID + Product Name + Product Price + , document.getElementById("app") ); @@ -41,11 +41,11 @@ function enumFormatter(cell: any, row: any, enumObject: any) { class SelectFilterWithDefaultValue extends React.Component { render() { return ( - - Product ID - Product Name - Product Quality + + Product ID + Product Name + Product Quality ); } @@ -54,9 +54,9 @@ class SelectFilterWithDefaultValue extends React.Component { class TextFilterWithCondition extends React.Component { render() { return ( - + Product ID - Product Name + Product Name Product Price ); @@ -72,15 +72,35 @@ function getCustomFilter(filterHandler: (parameters?: ApplyFilterParameter) => v class CustomFilter extends React.Component { render() { return ( - + Product ID Product Name - Product Is In Stock + Product Is In Stock ); } } +class RemoteProps extends React.Component { + render() { + return ( + { + remoteObj.cellEdit = true; + return remoteObj; + }} + options={{ + onCellEdit: (row: any, fieldName: string, value: any) => { console.info(row); } + }} + > + Product ID + Product Name + Product Is In Stock + + ); + } +} // Adopted from https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/column-header-span/column-header-span-complex.js export default class ColumnHeaderSpanComplex extends React.Component { render() { @@ -94,15 +114,15 @@ export default class ColumnHeaderSpanComplex extends React.Component { blurToSave: true }; return ( - - ID + ID Product name price Coupon In stock - Customer + Customer name order diff --git a/types/react-bootstrap/index.d.ts b/types/react-bootstrap/index.d.ts index b59403cc39..5c55ce6910 100644 --- a/types/react-bootstrap/index.d.ts +++ b/types/react-bootstrap/index.d.ts @@ -119,6 +119,8 @@ export { TabPane, Tabs, Thumbnail, + ToggleButton, + ToggleButtonGroup, Tooltip, Well, utils, diff --git a/types/react-bootstrap/lib/ToggleButton.d.ts b/types/react-bootstrap/lib/ToggleButton.d.ts new file mode 100644 index 0000000000..2de57ca211 --- /dev/null +++ b/types/react-bootstrap/lib/ToggleButton.d.ts @@ -0,0 +1,11 @@ +import * as React from 'react'; + +declare class ToggleButton extends React.Component { } +declare namespace ToggleButton { } +export = ToggleButton + +interface ToggleButtonProps extends React.HTMLProps { + checked?: boolean; + name?: string; + value: number|string; +} diff --git a/types/react-bootstrap/lib/ToggleButtonGroup.d.ts b/types/react-bootstrap/lib/ToggleButtonGroup.d.ts new file mode 100644 index 0000000000..30849be038 --- /dev/null +++ b/types/react-bootstrap/lib/ToggleButtonGroup.d.ts @@ -0,0 +1,21 @@ +import * as React from 'react'; + +declare class ToggleButtonGroup extends React.Component { } +declare namespace ToggleButtonGroup { } +export = ToggleButtonGroup + +interface ToggleButtonGroupProps extends React.HTMLProps { + /** Required if `type` is set to "radio" */ + name?: string; + type: "radio" | "checkbox"; + /** + * You'll usually want to use string|number|string[]|number[] here, + * but you can technically use any|any[]. + */ + defaultValue?: any; + /** + * You'll usually want to use string|number|string[]|number[] here, + * but you can technically use any|any[]. + */ + value?: any; +} diff --git a/types/react-bootstrap/lib/index.d.ts b/types/react-bootstrap/lib/index.d.ts index 28078e1bcd..9cf3b61777 100644 --- a/types/react-bootstrap/lib/index.d.ts +++ b/types/react-bootstrap/lib/index.d.ts @@ -83,6 +83,8 @@ import * as TabPane from './TabPane'; import * as Tabs from './Tabs'; import * as Thumbnail from './Thumbnail'; import * as Tooltip from './Tooltip'; +import * as ToggleButton from './ToggleButton' +import * as ToggleButtonGroup from './ToggleButtonGroup' import * as Well from './Well'; import * as utils from './utils'; @@ -173,6 +175,8 @@ export { Tabs, Thumbnail, Tooltip, + ToggleButton, + ToggleButtonGroup, Well, utils, } diff --git a/types/react-bootstrap/test/react-bootstrap-tests.tsx b/types/react-bootstrap/test/react-bootstrap-tests.tsx index 873132e64b..445e65dc12 100644 --- a/types/react-bootstrap/test/react-bootstrap-tests.tsx +++ b/types/react-bootstrap/test/react-bootstrap-tests.tsx @@ -12,7 +12,8 @@ import { Label, Badge, Jumbotron, PageHeader, Glyphicon, Table, Form, FormGroup, ControlLabel, FormControl, HelpBlock, - Radio, Checkbox, Media, InputGroup + Radio, Checkbox, Media, InputGroup, ToggleButtonGroup, + ToggleButton } from 'react-bootstrap'; export class ReactBootstrapTest extends Component { @@ -1270,6 +1271,26 @@ export class ReactBootstrapTest extends Component { + +
+ + + Checkbox 1 (pre-checked) + Checkbox 2 + Checkbox 3 (pre-checked) + + + + + + + Radio 1 (pre-checked) + + Radio 2 + Radio 3 + + +
); } diff --git a/types/react-chartjs-2/test/mix.tsx b/types/react-chartjs-2/test/mix.tsx index 208023b62d..614e61723e 100755 --- a/types/react-chartjs-2/test/mix.tsx +++ b/types/react-chartjs-2/test/mix.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; import { Bar } from 'react-chartjs-2'; +import { ChartData, ChartOptions } from 'chart.js'; -const data = { +const data: ChartData = { labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], datasets: [{ label: 'Sales', @@ -22,13 +23,11 @@ const data = { fill: false, backgroundColor: '#71B37C', borderColor: '#71B37C', - hoverBackgroundColor: '#71B37C', - hoverBorderColor: '#71B37C', yAxisID: 'y-axis-1' }] }; -const options = { +const options: ChartOptions = { responsive: true, tooltips: { mode: 'label' @@ -44,9 +43,6 @@ const options = { display: true, gridLines: { display: false - }, - labels: { - show: true } } ], @@ -58,9 +54,6 @@ const options = { id: 'y-axis-1', gridLines: { display: false - }, - labels: { - show: true } }, { @@ -70,9 +63,6 @@ const options = { id: 'y-axis-2', gridLines: { display: false - }, - labels: { - show: true } } ] diff --git a/types/react-data-grid/index.d.ts b/types/react-data-grid/index.d.ts index 65d0ddddc2..0dd44224b7 100644 --- a/types/react-data-grid/index.d.ts +++ b/types/react-data-grid/index.d.ts @@ -459,6 +459,12 @@ declare namespace AdazzleReactDataGridPlugins { export class SimpleTextEditor extends React.Component { } export class CheckboxEditor extends React.Component { } } + export namespace Filters { + export class NumericFilter extends React.Component { } + export class AutoCompleteFilter extends React.Component { } + export class MultiSelectFilter extends React.Component { } + export class SingleSelectFilter extends React.Component { } + } export namespace Formatters { export class ImageFormatter extends React.Component { } export class DropDownFormatter extends React.Component { } @@ -503,6 +509,7 @@ declare module "react-data-grid" { declare module "react-data-grid-addons" { import Plugins = AdazzleReactDataGridPlugins; import Editors = Plugins.Editors; + import Filters = Plugins.Filters; import Formatters = Plugins.Formatters; import Toolbar = Plugins.Toolbar; import Menu = Plugins.Menu; @@ -512,6 +519,7 @@ declare module "react-data-grid-addons" { // ES6 named exports export { Editors, + Filters, Formatters, Toolbar, Menu, @@ -523,9 +531,10 @@ declare module "react-data-grid-addons" { global { interface Window { ReactDataGridPlugins: { - Editors: typeof Editors - Formatters: typeof Formatters - Toolbar: typeof Toolbar + Editors: typeof Editors, + Filters: typeof Filters, + Formatters: typeof Formatters, + Toolbar: typeof Toolbar, Menu: typeof Menu, Data: typeof Data, DraggableHeader: typeof DraggableHeader diff --git a/types/react-faux-dom/tslint.json b/types/react-faux-dom/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/react-faux-dom/tslint.json +++ b/types/react-faux-dom/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/react-loadable/tslint.json b/types/react-loadable/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/react-loadable/tslint.json +++ b/types/react-loadable/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/react-measure/tslint.json b/types/react-measure/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/react-measure/tslint.json +++ b/types/react-measure/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/react-native-google-analytics-bridge/tslint.json b/types/react-native-google-analytics-bridge/tslint.json index 3db14f85ea..71ee04c4e1 100644 --- a/types/react-native-google-analytics-bridge/tslint.json +++ b/types/react-native-google-analytics-bridge/tslint.json @@ -1 +1,6 @@ -{ "extends": "dtslint/dt.json" } +{ + "extends": "dtslint/dt.json", + "rules": { + "no-unnecessary-generics": false + } +} diff --git a/types/react-native-material-kit/index.d.ts b/types/react-native-material-kit/index.d.ts index 5556bd4282..d9564be179 100644 --- a/types/react-native-material-kit/index.d.ts +++ b/types/react-native-material-kit/index.d.ts @@ -305,6 +305,11 @@ export interface MKProgressProperties extends ViewProperties { bufferAniDuration?: number; } +export interface IndeterminateProgressProperties extends ViewProperties { + progressColor?: string; + progressAniDuration?: number; +} + export interface BaseSlider extends ViewProperties { min?: number; max?: number; @@ -382,6 +387,10 @@ export class MKRipple extends React.Component {} export class MKProgress extends React.Component {} +export namespace MKProgress { + class Indeterminate extends React.Component {} +} + export class MKSlider extends React.Component {} export class MKRangeSlider extends diff --git a/types/react-native-material-kit/react-native-material-kit-tests.tsx b/types/react-native-material-kit/react-native-material-kit-tests.tsx index 3a3efa11c0..4cb415d791 100644 --- a/types/react-native-material-kit/react-native-material-kit-tests.tsx +++ b/types/react-native-material-kit/react-native-material-kit-tests.tsx @@ -78,6 +78,7 @@ const MKIconToggleTest = () => //// PROGRESS const MKProgressTest = () => ; +const MKIndeterminateProgressTest = () => ; //// SLIDER interface MKSliderTestState { diff --git a/types/react-native-vector-icons/Icon.d.ts b/types/react-native-vector-icons/Icon.d.ts index bb56a01794..07fd38f91b 100644 --- a/types/react-native-vector-icons/Icon.d.ts +++ b/types/react-native-vector-icons/Icon.d.ts @@ -197,6 +197,7 @@ export class Icon extends React.Component { export namespace Icon { class ToolbarAndroid extends React.Component {} + class TabBarItem extends React.Component {} class TabBarItemIOS extends React.Component {} class Button extends React.Component {} } diff --git a/types/react-native-vector-icons/index.d.ts b/types/react-native-vector-icons/index.d.ts index 3e9af9e042..b9dfc622c3 100644 --- a/types/react-native-vector-icons/index.d.ts +++ b/types/react-native-vector-icons/index.d.ts @@ -24,7 +24,7 @@ export function createIconSet( glyphMap: {}, fontFamily: string, fontFile?: string -): Icon; +): typeof Icon; /** * Convenience method to create a custom font based on a fontello config file. @@ -41,7 +41,7 @@ export function createIconSet( * @param {{}} config * @returns {Icon} */ -export function createIconSetFromFontello(config: {}): Icon; +export function createIconSetFromFontello(config: {}): typeof Icon; /** * Convenience method to create a custom font from IcoMoon @@ -59,4 +59,4 @@ export function createIconSetFromFontello(config: {}): Icon; * @param {{}} config * @returns {Icon} */ -export function createIconSetFromIcoMoon(config: {}): Icon; +export function createIconSetFromIcoMoon(config: {}): typeof Icon; diff --git a/types/react-native-vector-icons/react-native-vector-icons-tests.tsx b/types/react-native-vector-icons/react-native-vector-icons-tests.tsx index 99a2b3ac8b..b6adf8d8c6 100644 --- a/types/react-native-vector-icons/react-native-vector-icons-tests.tsx +++ b/types/react-native-vector-icons/react-native-vector-icons-tests.tsx @@ -1,9 +1,22 @@ import * as React from 'react'; import { View, Text, TabBarIOS } from 'react-native'; +import { createIconSet } from 'react-native-vector-icons'; import MaterialIcon from 'react-native-vector-icons/MaterialIcons'; import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; import Ionicon from 'react-native-vector-icons/Ionicons'; +const glyphMap = { + custom: 58918 +}; + +const CustomIcon = createIconSet(glyphMap, 'FontCustom', 'FontCustom.ttf'); + +const CustomIconButton = CustomIcon.Button; +const CustomIconTabBarItem = CustomIcon.TabBarItem; +const CustomIconTabBarItemIOS = CustomIcon.TabBarItemIOS; +const CustomIconToolbarAndroid = CustomIcon.ToolbarAndroid; +const CustomIcongetImageSource = CustomIcon.getImageSource; + class Example extends React.Component { handleButton() { console.log('You pressed me'); @@ -30,7 +43,7 @@ class Example extends React.Component { } } -class TabTest extends React.Component { +class TabTest extends React.Component { constructor() { super(); @@ -49,7 +62,7 @@ class TabTest extends React.Component { selectedIconColor="pink" renderAsOriginal selected={this.state.selectedTab === 'tab1'} - onPress={() => this.setState({selectedTab: 'tab1'})} + onPress={() => this.setState({ selectedTab: 'tab1' })} > @@ -61,7 +74,7 @@ class TabTest extends React.Component { selectedIconColor='pink' renderAsOriginal selected={this.state.selectedTab === 'tab2'} - onPress={() => this.setState({selectedTab: 'tab2'})} + onPress={() => this.setState({ selectedTab: 'tab2' })} > @@ -69,3 +82,33 @@ class TabTest extends React.Component { ); } } + +class TestCustomIcon extends React.Component { + constructor() { + super(); + } + + handleButton() { + console.log('You pressed me'); + } + + render() { + return ( + + {/* Custom Icon */} + + + {/* Custom Icon button */} + this.handleButton()} + > + + Hello CustomIcon! + + + + ); + } +} diff --git a/types/react-native-video/index.d.ts b/types/react-native-video/index.d.ts index 8b31bfed0d..b264df6d64 100644 --- a/types/react-native-video/index.d.ts +++ b/types/react-native-video/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for react-native-video 1.0 +// Type definitions for react-native-video 2.0 // Project: https://github.com/react-native-community/react-native-video // Definitions by: HuHuanming +// abrahambotros // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -48,7 +49,10 @@ export interface VideoProperties extends ViewProperties { onLoad?(): void; onBuffer?(): void; onError?(): void; - onProgress?(): void; + onProgress?(data: { + currentTime: number, + playableDuration: number, + }): void; onSeek?(): void; onEnd?(): void; onFullscreenPlayerWillPresent?(): void; diff --git a/types/react-native-video/react-native-video-tests.tsx b/types/react-native-video/react-native-video-tests.tsx index e0ec0bad73..5b61336e80 100644 --- a/types/react-native-video/react-native-video-tests.tsx +++ b/types/react-native-video/react-native-video-tests.tsx @@ -7,16 +7,26 @@ import { } from 'react-native'; import Video from 'react-native-video'; -class SwiperTest extends React.Component { +class VideoTest extends React.Component { constructor(props: {}) { super(props); } render(): React.ReactElement { return ( -