From b140f34dbd954864ee247a3f94dbd52d094a9940 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Fri, 24 Feb 2017 13:18:26 -0700 Subject: [PATCH 001/486] Add setVisible to iFrame control --- xrm/index.d.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xrm/index.d.ts b/xrm/index.d.ts index 02bce0468e..67c5a8e778 100644 --- a/xrm/index.d.ts +++ b/xrm/index.d.ts @@ -1188,6 +1188,19 @@ declare namespace Xrm getVisible(): boolean; } + /** + * Interface for UI elements which can have the visibility value updated. + */ + export interface UiCanSetVisibleElement + { + /** + * Sets the visibility state. + * + * @param {boolean} visible true to show, false to hide. + */ + setVisible( visible: boolean ): void; + } + /** * Base interface for standard UI elements. */ @@ -2522,7 +2535,7 @@ declare namespace Xrm * * @sa FramedControl */ - export interface IframeControl extends FramedControl + export interface IframeControl extends FramedControl, UiCanSetVisibleElement { /** * Gets initial URL defined for the Iframe. From 15f1ae0ccb896c91f9a1ea697945cba6b9f7c95e Mon Sep 17 00:00:00 2001 From: Danny Cochran Date: Wed, 16 Aug 2017 16:25:39 -0700 Subject: [PATCH 002/486] update react-native image source typing When requiring in an image path (require('./path/to/image.png')), the require resolves to a number. This number can be passed directly into the image source, e.g: ```javascript const imageId = require('./path/to/image.png'); return ; ``` I'm not sure if this has official documentation anywhere but this is how I've been rendering images for some time: https://facebook.github.io/react-native/docs/image.html#source --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 848f4f4d2d..38f60f6fec 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3400,7 +3400,7 @@ export interface ImageProperties extends ImagePropertiesIOS, ImagePropertiesAndr * their width and height. The native side will then choose the best `uri` to display * based on the measured size of the image container. */ - source: ImageURISource | ImageURISource[] + source: ImageURISource | ImageURISource[] | number /** * similarly to `source`, this property represents the resource used to render From b921423137af2f8a160c408be71fae076c12f7ee Mon Sep 17 00:00:00 2001 From: Nishant Kyal Date: Mon, 28 Aug 2017 14:17:24 +0530 Subject: [PATCH 003/486] Added support for nightmare-inline-download to nightmare.js --- types/nightmare/index.d.ts | 11 +++++++++++ types/nightmare/nightmare-tests.ts | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/types/nightmare/index.d.ts b/types/nightmare/index.d.ts index 1af05002d3..f61c23c987 100644 --- a/types/nightmare/index.d.ts +++ b/types/nightmare/index.d.ts @@ -30,6 +30,8 @@ declare class Nightmare { uncheck(seletor: string): Nightmare; select(seletor: string, option: string): Nightmare; upload(selector: string, path: string): Nightmare; + download(path:string): Nightmare; + download(action: Nightmare.IDownloadActions): Nightmare; scrollTo(top: number, left: number): Nightmare; viewport(width: number, height: number): Nightmare; inject(type: string, file: string): Nightmare; @@ -134,6 +136,11 @@ declare namespace Nightmare { cookiesFile?: string; phantomPath?: string; show?: boolean; + paths?: { + downloads?:string; + }; + maxDownloadRequestWait?:number; + ignoreDownloads?:boolean; } export interface IRequest { @@ -171,6 +178,10 @@ declare namespace Nightmare { line: number; function?: string; } + export enum IDownloadActions { + cancel = "cancel", + continue = "continue" + } export class Cookies { get(): [Nightmare.ICookie]; get(name: string): Nightmare.ICookie; diff --git a/types/nightmare/nightmare-tests.ts b/types/nightmare/nightmare-tests.ts index 921e961538..b07a13bc6f 100644 --- a/types/nightmare/nightmare-tests.ts +++ b/types/nightmare/nightmare-tests.ts @@ -343,3 +343,9 @@ new Nightmare() new Nightmare() .goto('https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select') .select('select[name=select]', 'value3'); + +new Nightmare() + .goto('https://github.com/segmentio/nightmare') + .click('a[href="/segmentio/nightmare/archive/master.zip"]') + .download('/some/other/path/master.zip'); + .run(done); From 0b991edc75a2082ae8e4cdc1ebe05cf2bbd46f3e Mon Sep 17 00:00:00 2001 From: James Date: Thu, 31 Aug 2017 18:38:48 +0200 Subject: [PATCH 004/486] Initial API without namespaces. --- types/peer-dial/index.d.ts | 98 ++++++++++++++++++++++++++++++ types/peer-dial/peer-dial-tests.ts | 1 + types/peer-dial/tsconfig.json | 22 +++++++ types/peer-dial/tslint.json | 1 + 4 files changed, 122 insertions(+) create mode 100644 types/peer-dial/index.d.ts create mode 100644 types/peer-dial/peer-dial-tests.ts create mode 100644 types/peer-dial/tsconfig.json create mode 100644 types/peer-dial/tslint.json diff --git a/types/peer-dial/index.d.ts b/types/peer-dial/index.d.ts new file mode 100644 index 0000000000..1c638ab3d4 --- /dev/null +++ b/types/peer-dial/index.d.ts @@ -0,0 +1,98 @@ +/** Declaration file generated by dts-gen */ + +/// +/// +/// + +import * as events from "events"; +import * as express from "express"; +import * as uuid from "node-uuid"; + +//TODO: Needs namespaces for all of this. + +export class Server extends events.EventEmitter{ + constructor(options: ServerOptions); + + start(): void; + + stop(): void; + + corsOptionsAppsDelegate(req: string, callback: (err: any, data: CorsOptions) => void): void; + +} + +export interface CorsOptions { + origin: boolean; + methods: string[]; + exposedHeaders: string[]; +} + +export interface ServerOptions { + expressApp: express.Express; + prefix: string; + port: number; + host: string; + uuid: uuid.UUIDOptions; + friendlyName: string; + manufacturer: string; + modelName: string; + maxContentLength: number; + extraHeaders: Object; + delegate: Delegate; + corsAllowOrigins: boolean; +} + +export class Delegate { + + getApp(appName: string) : App; + + launchApp(appName: string, launchData: string, callback: (data: string) => void) : void; + + stopApp(appName: string, pid: string, callback: (data: boolean) => void) : void; +} + +export interface App { + name: string; + state: string; + allowStop: boolean; + pid: string; + + launch(launchData: string): void; +} + +export class Client extends events.EventEmitter { + constructor(); + + getDialDevice(deviceDescriptionUrl: string, callback?: (data: DialDevice, err: any) => void) : void; + + start() : void; + + refresh() : void; + + stop() : void; +} + +export class DialDevice { + constructor(deviceInfo: DeviceInfo); + + getAppInfoXml(appName: string, callback?: (data: string, err: any) => void) :void; + + getAppInfo(appName: string, callback?: (data: Object, err: any) => void): void; + + launchApp(appName: string, launchData: string, contentType: string, callback?: (data: string, err: any) => void): void; + + stopApp(appName: string, pid: string, callback?: (data: number, err: any) => void): void; +} + +interface DeviceInfo { + descriptionUrl: string; + applicationUrl: string; + deviceType: string; + friendlyName: string; + manufacturer: string; + modelName: string; + UDN: string; + iconList: Object[] | { + icon: Object + }; +} diff --git a/types/peer-dial/peer-dial-tests.ts b/types/peer-dial/peer-dial-tests.ts new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/types/peer-dial/peer-dial-tests.ts @@ -0,0 +1 @@ + diff --git a/types/peer-dial/tsconfig.json b/types/peer-dial/tsconfig.json new file mode 100644 index 0000000000..5cfd0105d1 --- /dev/null +++ b/types/peer-dial/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", + "peer-dial-tests.ts" + ] +} diff --git a/types/peer-dial/tslint.json b/types/peer-dial/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/peer-dial/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" } From fa09c672de4658e456f472c3ffa51a62e8d1e436 Mon Sep 17 00:00:00 2001 From: James Date: Wed, 6 Sep 2017 17:46:08 +0200 Subject: [PATCH 005/486] Did more work on typings. --- types/peer-dial/index.d.ts | 54 +++++++++++++++---------- types/peer-dial/peer-dial-tests.ts | 64 ++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 22 deletions(-) diff --git a/types/peer-dial/index.d.ts b/types/peer-dial/index.d.ts index 1c638ab3d4..1e01f3b287 100644 --- a/types/peer-dial/index.d.ts +++ b/types/peer-dial/index.d.ts @@ -1,4 +1,6 @@ -/** Declaration file generated by dts-gen */ +// Type definitions for peer-dial 0.0.7 +// Project: https://github.com/fraunhoferfokus/peer-dial +// Definitions by: James Tooley /// /// @@ -8,9 +10,7 @@ import * as events from "events"; import * as express from "express"; import * as uuid from "node-uuid"; -//TODO: Needs namespaces for all of this. - -export class Server extends events.EventEmitter{ +export class Server extends events.EventEmitter { constructor(options: ServerOptions); start(): void; @@ -31,24 +31,24 @@ export interface ServerOptions { expressApp: express.Express; prefix: string; port: number; - host: string; - uuid: uuid.UUIDOptions; - friendlyName: string; + host?: string; + uuid?: uuid.UUIDOptions; + friendlyName?: string; manufacturer: string; modelName: string; - maxContentLength: number; - extraHeaders: Object; + maxContentLength?: number; + extraHeaders?: Object; delegate: Delegate; - corsAllowOrigins: boolean; + corsAllowOrigins: string | boolean; } -export class Delegate { +export interface Delegate { - getApp(appName: string) : App; + getApp(appName: string): App; - launchApp(appName: string, launchData: string, callback: (data: string) => void) : void; + launchApp(appName: string, launchData: string, callback: (data: string) => void): void; - stopApp(appName: string, pid: string, callback: (data: boolean) => void) : void; + stopApp(appName: string, pid: string, callback: (data: boolean) => void): void; } export interface App { @@ -60,24 +60,34 @@ export interface App { launch(launchData: string): void; } +export interface AppInfo { + dialVer: string; + name: string; + options: AppInfoOptions; + state: string; + xmlns: string; +} + +export interface AppInfoOptions { + allowStop: string; +} + export class Client extends events.EventEmitter { - constructor(); + getDialDevice(deviceDescriptionUrl: string, callback?: (data: DialDevice, err: any) => void): void; - getDialDevice(deviceDescriptionUrl: string, callback?: (data: DialDevice, err: any) => void) : void; + start(): void; - start() : void; + refresh(): void; - refresh() : void; - - stop() : void; + stop(): void; } export class DialDevice { constructor(deviceInfo: DeviceInfo); - getAppInfoXml(appName: string, callback?: (data: string, err: any) => void) :void; + getAppInfoXml(appName: string, callback?: (data: string, err: any) => void): void; - getAppInfo(appName: string, callback?: (data: Object, err: any) => void): void; + getAppInfo(appName: string, callback?: (data: AppInfo, err: any) => void): void; launchApp(appName: string, launchData: string, contentType: string, callback?: (data: string, err: any) => void): void; diff --git a/types/peer-dial/peer-dial-tests.ts b/types/peer-dial/peer-dial-tests.ts index 8b13789179..72863ef647 100644 --- a/types/peer-dial/peer-dial-tests.ts +++ b/types/peer-dial/peer-dial-tests.ts @@ -1 +1,65 @@ +import { Server, Client, App, AppInfo, CorsOptions, ServerOptions, Delegate, DialDevice, DeviceInfo } from 'peer-dial'; +import * as express from 'express'; + +class AppImpl implements App { + + name: string; + state: string; + allowStop: boolean; + pid: string; + + public launch(launchData: string): void{ + + } +} + +const app = new AppImpl(); + +class DelegateImpl implements Delegate { + + public getApp(appName: string): App{ + return app; + } + + public launchApp(appName: string, launchData: string, callback: (data: string) => void): void{ + + } + + public stopApp(appName: string, pid: string, callback: (data: boolean) => void): void { + + } +} + +const delegate = new DelegateImpl(); + +function testServer() { + + const object = new Server({ + expressApp: express(), + prefix: '/dial', + port: 3000, + corsAllowOrigins: '*', + manufacturer: 'testing', + modelName: 'testing', + delegate: delegate + }); +} + +function testClient() { + const client = new Client(); + client.on("ready", () => { + + }).on('found', (deviceDescriptionUrl: string, ssdpHeaders: string) => { + client.getDialDevice(deviceDescriptionUrl, (dialDevice: DialDevice, err: any) => { + dialDevice.getAppInfo('YouTube', (appInfo: AppInfo, err: any) => { + if(appInfo) { + dialDevice.launchApp("YouTube", "something", "text/plain", (data: string, err: any) => { + + }); + } + }); + }); + }); + client.start(); +} \ No newline at end of file From fca6aebeff579f85bbe66f1c889ef2875d6590c8 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 8 Sep 2017 18:14:32 +0200 Subject: [PATCH 006/486] Final changes to the typings. --- types/peer-dial/index.d.ts | 31 ++++++++--------------------- types/peer-dial/peer-dial-tests.ts | 32 +++++++----------------------- 2 files changed, 15 insertions(+), 48 deletions(-) diff --git a/types/peer-dial/index.d.ts b/types/peer-dial/index.d.ts index 1e01f3b287..4d3af378b6 100644 --- a/types/peer-dial/index.d.ts +++ b/types/peer-dial/index.d.ts @@ -1,10 +1,10 @@ -// Type definitions for peer-dial 0.0.7 +// Type definitions for peer-dial 0.0 // Project: https://github.com/fraunhoferfokus/peer-dial -// Definitions by: James Tooley +// Definitions by: James Tooley +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.4 /// -/// -/// import * as events from "events"; import * as express from "express"; @@ -12,13 +12,9 @@ import * as uuid from "node-uuid"; export class Server extends events.EventEmitter { constructor(options: ServerOptions); - start(): void; - stop(): void; - corsOptionsAppsDelegate(req: string, callback: (err: any, data: CorsOptions) => void): void; - } export interface CorsOptions { @@ -37,17 +33,14 @@ export interface ServerOptions { manufacturer: string; modelName: string; maxContentLength?: number; - extraHeaders?: Object; + extraHeaders?: object; delegate: Delegate; corsAllowOrigins: string | boolean; } export interface Delegate { - getApp(appName: string): App; - launchApp(appName: string, launchData: string, callback: (data: string) => void): void; - stopApp(appName: string, pid: string, callback: (data: boolean) => void): void; } @@ -56,7 +49,6 @@ export interface App { state: string; allowStop: boolean; pid: string; - launch(launchData: string): void; } @@ -74,27 +66,20 @@ export interface AppInfoOptions { export class Client extends events.EventEmitter { getDialDevice(deviceDescriptionUrl: string, callback?: (data: DialDevice, err: any) => void): void; - start(): void; - refresh(): void; - stop(): void; } export class DialDevice { constructor(deviceInfo: DeviceInfo); - getAppInfoXml(appName: string, callback?: (data: string, err: any) => void): void; - getAppInfo(appName: string, callback?: (data: AppInfo, err: any) => void): void; - launchApp(appName: string, launchData: string, contentType: string, callback?: (data: string, err: any) => void): void; - stopApp(appName: string, pid: string, callback?: (data: number, err: any) => void): void; } -interface DeviceInfo { +export interface DeviceInfo { descriptionUrl: string; applicationUrl: string; deviceType: string; @@ -102,7 +87,7 @@ interface DeviceInfo { manufacturer: string; modelName: string; UDN: string; - iconList: Object[] | { - icon: Object + iconList: object[] | { + icon: object }; } diff --git a/types/peer-dial/peer-dial-tests.ts b/types/peer-dial/peer-dial-tests.ts index 72863ef647..cb4238da62 100644 --- a/types/peer-dial/peer-dial-tests.ts +++ b/types/peer-dial/peer-dial-tests.ts @@ -1,40 +1,25 @@ - import { Server, Client, App, AppInfo, CorsOptions, ServerOptions, Delegate, DialDevice, DeviceInfo } from 'peer-dial'; import * as express from 'express'; class AppImpl implements App { - name: string; state: string; allowStop: boolean; pid: string; - - public launch(launchData: string): void{ - + launch(launchData: string): void { } } - const app = new AppImpl(); - class DelegateImpl implements Delegate { - - public getApp(appName: string): App{ + getApp(appName: string): App { return app; } - - public launchApp(appName: string, launchData: string, callback: (data: string) => void): void{ - + launchApp(appName: string, launchData: string, callback: (data: string) => void): void { } - - public stopApp(appName: string, pid: string, callback: (data: boolean) => void): void { - + stopApp(appName: string, pid: string, callback: (data: boolean) => void): void { } } - -const delegate = new DelegateImpl(); - function testServer() { - const object = new Server({ expressApp: express(), prefix: '/dial', @@ -42,24 +27,21 @@ function testServer() { corsAllowOrigins: '*', manufacturer: 'testing', modelName: 'testing', - delegate: delegate + delegate: new DelegateImpl() }); } - function testClient() { const client = new Client(); client.on("ready", () => { - }).on('found', (deviceDescriptionUrl: string, ssdpHeaders: string) => { client.getDialDevice(deviceDescriptionUrl, (dialDevice: DialDevice, err: any) => { dialDevice.getAppInfo('YouTube', (appInfo: AppInfo, err: any) => { - if(appInfo) { + if (appInfo) { dialDevice.launchApp("YouTube", "something", "text/plain", (data: string, err: any) => { - }); } }); }); }); client.start(); -} \ No newline at end of file +} From 0f88a0e41e3f5b6a35d65d43fc13758cf84bd623 Mon Sep 17 00:00:00 2001 From: Dima Livshits Date: Mon, 11 Sep 2017 17:17:18 +0300 Subject: [PATCH 007/486] add className prop and make manager prop optional --- types/react-overlays/lib/Modal.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/react-overlays/lib/Modal.d.ts b/types/react-overlays/lib/Modal.d.ts index c89c607e76..13a397f3b5 100644 --- a/types/react-overlays/lib/Modal.d.ts +++ b/types/react-overlays/lib/Modal.d.ts @@ -10,6 +10,8 @@ declare namespace Modal { } export = Modal; interface ModalProps extends TransitionCallbacks, PortalProps { + className?: string; + /** * Set the visibility of the Modal */ @@ -122,5 +124,5 @@ interface ModalProps extends TransitionCallbacks, PortalProps { * A ModalManager instance used to track and manage the state of open * Modals. Useful when customizing how modals interact within a container */ - manager: ModalManager; + manager?: ModalManager; } From 1c8a7b211e2daeb47943a8319223e03140a19e2b Mon Sep 17 00:00:00 2001 From: Sergei Dorogin Date: Mon, 11 Sep 2017 17:38:39 +0300 Subject: [PATCH 008/486] [jquery.fancytree] added enableUpdate method (reference http://www.wwwendt.de/tech/fancytree/doc/jsdoc/Fancytree.html#enableUpdate) --- types/jquery.fancytree/index.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/types/jquery.fancytree/index.d.ts b/types/jquery.fancytree/index.d.ts index f4e6ac7be8..34d90d9e8f 100644 --- a/types/jquery.fancytree/index.d.ts +++ b/types/jquery.fancytree/index.d.ts @@ -190,6 +190,13 @@ declare namespace Fancytree { /** Write warning to browser console (prepending tree info) */ warn(msg: any): void; + + /** Temporarily suppress rendering to improve performance on bulk-updates. + * + * @param {boolean} flag + * @returns {boolean} previous status + * @since 2.19 */ + enableUpdate(enabled: boolean): void; } /** A FancytreeNode represents the hierarchical data model and operations. */ From d75afe93fb435780143bb6c5eeb54403647e4e88 Mon Sep 17 00:00:00 2001 From: Rudi Chen Date: Mon, 11 Sep 2017 11:39:04 -0700 Subject: [PATCH 009/486] Fix typo (any -> all) for everyWhere description --- types/enzyme/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/enzyme/index.d.ts b/types/enzyme/index.d.ts index 8ebb11ce94..b0d044a484 100644 --- a/types/enzyme/index.d.ts +++ b/types/enzyme/index.d.ts @@ -342,7 +342,7 @@ export interface CommonWrapper

{ every(selector: EnzymeSelector): boolean; /** - * Returns whether or not any of the nodes in the wrapper pass the provided predicate function. + * Returns whether or not all of the nodes in the wrapper pass the provided predicate function. * @param fn */ everyWhere(fn: (wrapper: this) => boolean): boolean; From ad8d4fc374e149b8b8fd7cb8e5cc41ed3f0d1147 Mon Sep 17 00:00:00 2001 From: Clark Stevenson Date: Mon, 11 Sep 2017 20:01:14 +0100 Subject: [PATCH 010/486] Minor Pixi.js updates to v4.5.5 --- types/pixi.js/index.d.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/types/pixi.js/index.d.ts b/types/pixi.js/index.d.ts index 7273b6208f..dd0cf108df 100644 --- a/types/pixi.js/index.d.ts +++ b/types/pixi.js/index.d.ts @@ -421,7 +421,7 @@ declare namespace PIXI { protected _cr?: number; protected _cy?: number; protected _sy?: number; - protected _nsx?: number; + protected _sx?: number; protected _cx?: number; updateSkew(): void; @@ -941,7 +941,7 @@ declare namespace PIXI { CONTEXT_UID: number; state?: WebGLState; renderingToScreen: boolean; - boundTextures: Texture[]; + boundTextures: BaseTexture[]; filterManager: FilterManager; textureManager?: TextureManager; textureGC?: TextureGarbageCollector; @@ -1159,6 +1159,9 @@ declare namespace PIXI { stencilMaskStack: Graphics[]; + protected _useCurrent(): void; + protected _getBitwiseMask(): number; + setMaskStack(stencilMasStack: Graphics[]): void; pushStencil(graphics: Graphics): void; popStencil(): void; @@ -1183,7 +1186,7 @@ declare namespace PIXI { constructor(vertexSrc?: string, fragmentSrc?: string, uniforms?: UniformDataMap); protected _blendMode: number; - vertextSrc?: string; + vertexSrc?: string; fragmentSrc: string; blendMode: number; protected uniformData: UniformDataMap; @@ -1378,6 +1381,8 @@ declare namespace PIXI { fontVariant: string; protected _fontWeight: string; fontWeight: string; + protected _leading: number; + leading: number; protected _letterSpacing: number; letterSpacing: number; protected _lineHeight: number; @@ -1400,7 +1405,6 @@ declare namespace PIXI { wordWrap: boolean; protected _wordWrapWidth: number; wordWrapWidth: number; - leading: number; toFontString(): string; } class TextMetrics { @@ -1859,6 +1863,7 @@ declare namespace PIXI { tilePosition: Point | ObservablePoint; multiplyUvs(uvs: Float32Array, out: Float32Array): Float32Array; + protected _textureDirtyFlag: boolean; protected _onTextureUpdate(): void; protected _renderWebGL(renderer: WebGLRenderer): void; protected _renderCanvas(renderer: CanvasRenderer): void; From 39165196404f72f1434fbcb3de59835d22ce1677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ars=C3=A8ne=20von=20Wyss?= Date: Tue, 12 Sep 2017 00:55:04 +0200 Subject: [PATCH 011/486] mfiles: Added missing CLSID constants --- types/mfiles/index.d.ts | 10 ++++++++-- types/mfiles/mfiles-tests.ts | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/types/mfiles/index.d.ts b/types/mfiles/index.d.ts index d500086598..db31565309 100644 --- a/types/mfiles/index.d.ts +++ b/types/mfiles/index.d.ts @@ -309,6 +309,11 @@ interface IClassGroups { Item(Index: number): IClassGroup; } +interface ICLSIDs { + readonly PreviewerCtrl: string; + readonly ShellListingCtrl: string; +} + interface ICollection { readonly Count: number; readonly Events: IEvents; @@ -393,9 +398,9 @@ interface IDailyTrigger { DaysInterval: number; } -interface IDashboard { +interface IDashboard { AutoStopWithParent: boolean; - readonly CustomData: any; + readonly CustomData: T; readonly Events: IDashboardEvents; readonly IsPopupDashboard: boolean; readonly Parent: (IShellPaneContainer | IShellFrame | IVaultUI | IShellUI); @@ -6169,6 +6174,7 @@ declare namespace MFiles { const XMLSearchResult: { new(): IXMLSearchResult; }; const ApplicationPath: string; + const CLSID: ICLSIDs; function CreateInstance(name: string): any; function CreateObjectCLR(assemblyFile: string, className: string): any; diff --git a/types/mfiles/mfiles-tests.ts b/types/mfiles/mfiles-tests.ts index ff9d09a482..4271042137 100644 --- a/types/mfiles/mfiles-tests.ts +++ b/types/mfiles/mfiles-tests.ts @@ -72,6 +72,7 @@ function setTheme(shellFrame: IShellFrame) { function OnNewShellUI(shellUI: IShellUI) { shellUI.Events.Register(MFiles.Event.NewShellFrame, newShellFrameHandler); shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, newShellFrameHandler); + const html = ` `; } function newShellFrameHandler(shellFrame: IShellFrame) { From b466184ff29efb3815974e5ad3e0f25ecf070711 Mon Sep 17 00:00:00 2001 From: Florian Richter Date: Tue, 12 Sep 2017 12:59:32 +0200 Subject: [PATCH 012/486] Reduce strictness of types for redux actions to reduce false positives --- types/redux-actions/index.d.ts | 111 +++++++-------------- types/redux-actions/redux-actions-tests.ts | 16 +-- 2 files changed, 42 insertions(+), 85 deletions(-) diff --git a/types/redux-actions/index.d.ts b/types/redux-actions/index.d.ts index d088592217..d909fcfc7a 100644 --- a/types/redux-actions/index.d.ts +++ b/types/redux-actions/index.d.ts @@ -4,6 +4,7 @@ // Alex Gorbatchev , // Alec Hill // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 export as namespace ReduxActions; @@ -22,12 +23,12 @@ export interface ActionMeta extends Action { meta: Meta; } -export interface ReducerMap { - [actionType: string]: Reducer | ReducerNextThrow; +export interface ReducerMap { + [actionType: string]: Reducer | ReducerNextThrow; } -export interface ReducerMapMeta { - [actionType: string]: ReducerMeta | ReducerNextThrowMeta; +export interface ReducerMapMeta { + [actionType: string]: ReducerMeta | ReducerNextThrowMeta; } export interface ReducerNextThrow { @@ -41,11 +42,7 @@ export interface ReducerNextThrowMeta { } export type ActionFunctions = - ActionFunction0> | - ActionFunction1> | - ActionFunction2> | - ActionFunction3> | - ActionFunction4> | + ActionFunction> | ActionFunctionAny>; export type Reducer = (state: State, action: Action) => State; @@ -53,45 +50,21 @@ export type Reducer = (state: State, action: Action) => export type ReducerMeta = (state: State, action: ActionMeta) => State; /** argument inferring borrowed from lodash definitions */ -export type ActionFunction0 = () => R; -export type ActionFunction1 = (t1: T1) => R; -export type ActionFunction2 = (t1: T1, t2: T2) => R; -export type ActionFunction3 = (t1: T1, t2: T2, t3: T3) => R; -export type ActionFunction4 = (t1: T1, t2: T2, t3: T3, t4: T4) => R; +export type ActionFunction = (t1?: T1, t2?: T2, t3?: T3, t4?: T4) => R; export type ActionFunctionAny = (...args: any[]) => R; export function createAction( actionType: string -): ActionFunction0>; +): ActionFunction>; -export function createAction( +export function createAction( actionType: string, - payloadCreator: ActionFunction0 -): ActionFunction0>; - -export function createAction( - actionType: string, - payloadCreator: ActionFunction1 -): ActionFunction1>; - -export function createAction( - actionType: string, - payloadCreator: ActionFunction2 -): ActionFunction2>; - -export function createAction( - actionType: string, - payloadCreator: ActionFunction3 -): ActionFunction3>; - -export function createAction( - actionType: string, - payloadCreator: ActionFunction4 -): ActionFunction4>; + payloadCreator: ActionFunction +): ActionFunction, Arg1, Arg2, Arg3, Arg4>; export function createAction( actionType: string -): ActionFunction1>; +): ActionFunction, Payload>; export function createAction( actionType: string, @@ -99,29 +72,11 @@ export function createAction( metaCreator: ActionFunctionAny ): ActionFunctionAny>; -export function createAction( - actionType: string, - payloadCreator: ActionFunction1, - metaCreator: ActionFunction1 -): ActionFunction1>; - -export function createAction( - actionType: string, - payloadCreator: ActionFunction2, - metaCreator: ActionFunction2 -): ActionFunction2>; - -export function createAction( - actionType: string, - payloadCreator: ActionFunction3, - metaCreator: ActionFunction3 -): ActionFunction3>; - export function createAction( actionType: string, - payloadCreator: ActionFunction4, - metaCreator: ActionFunction4 -): ActionFunction4>; + payloadCreator: ActionFunction, + metaCreator: ActionFunction +): ActionFunction, Arg1, Arg2, Arg3, Arg4>; export function handleAction( actionType: string | ActionFunctions, @@ -135,34 +90,36 @@ export function handleAction( initialState: State ): Reducer; -export function handleActions( - reducerMap: ReducerMap, - initialState: StateAndPayload -): Reducer; - -export function handleActions( - reducerMap: ReducerMap, +export function handleActions( + reducerMap: ReducerMap, initialState: State -): Reducer; +): Reducer; -export function handleActions( - reducerMap: ReducerMapMeta, +export function handleActions( + reducerMap: ReducerMapMeta, initialState: State -): ReducerMeta; +): ReducerMeta; export function combineActions(...actionTypes: Array | string>): string; -export interface ActionMap { +export interface ActionMap { [actionType: string]: - ActionMap | - ActionFunctionAny | - [ActionFunctionAny, ActionFunctionAny] | - undefined; + ActionMap | + ActionFunctionAny | + [ActionFunctionAny, ActionFunctionAny] | + undefined; } +export function createActions( + actionMap: ActionMap, + ...identityActions: string[] +): { + [actionName: string]: ActionFunctionAny> +}; + export function createActions( actionMap: ActionMap, ...identityActions: string[] ): { - [actionName: string]: ActionFunctionAny> + [actionName: string]: ActionFunctionAny> }; diff --git a/types/redux-actions/redux-actions-tests.ts b/types/redux-actions/redux-actions-tests.ts index 003599c8bc..e12efd461f 100644 --- a/types/redux-actions/redux-actions-tests.ts +++ b/types/redux-actions/redux-actions-tests.ts @@ -1,4 +1,4 @@ -import * as ReduxActions from "redux-actions"; +import * as ReduxActions from 'redux-actions'; let state: number; const minimalAction: ReduxActions.BaseAction = { type: 'INCREMENT' }; @@ -33,14 +33,14 @@ const actionHandlerWithReduceMap = ReduxActions.handleAction( state = actionHandlerWithReduceMap(0, multiplyAction(10)); -const actionsHandler = ReduxActions.handleActions({ +const actionsHandler = ReduxActions.handleActions({ INCREMENT: (state: number, action: ReduxActions.Action) => state + action.payload, MULTIPLY: (state: number, action: ReduxActions.Action) => state * action.payload }, 0); state = actionsHandler(0, { type: 'INCREMENT' }); -const actionsHandlerWithInitialState = ReduxActions.handleActions({ +const actionsHandlerWithInitialState = ReduxActions.handleActions({ INCREMENT: { next: (state: number, action: ReduxActions.Action) => state + action.payload, }, @@ -112,9 +112,9 @@ ReduxActions.Action = ReduxActions.createAction( +const typedActionHandlerReducerMap = ReduxActions.handleActions( { - INCREMENT: (state: TypedState, action: ReduxActions.Action) => ({ value: state.value + 1 }) + INCREMENT: (state: TypedState, action: ReduxActions.Action) => ({ value: state.value + 1 }) }, {value: 1} ); @@ -144,7 +144,7 @@ const typedActionHandlerWithMeta = ReduxActions.handleAction( +const typedActionHandlerReducerMetaMap = ReduxActions.handleActions( { INCREMENT_BY: { next(state: TypedState, action: ReduxActions.ActionMeta) { @@ -159,7 +159,7 @@ const typedActionHandlerReducerMetaMap = ReduxActions.handleActions ReduxActions.ActionMeta = - ReduxActions.createAction( + ReduxActions.createAction( 'INCREMENT_BY', amount => ({ increase: amount }), amount => ({ remote: true }) @@ -172,7 +172,7 @@ actionMetaFrom1Arg.meta.remote; typedState = typedActionHandlerReducerMetaMap({ value: 0 }, actionMetaFrom1Arg); const typedActionWithMeta2TypedArgs: (value: number, remote: boolean) => ReduxActions.ActionMeta = - ReduxActions.createAction( + ReduxActions.createAction( 'INCREMENT_BY', (amount, remote) => ({ increase: amount }), (amount, remote) => ({ remote }) From e66cc7c8203508b64bca65b716c0d60c08566f67 Mon Sep 17 00:00:00 2001 From: Florian Richter Date: Tue, 12 Sep 2017 13:40:45 +0200 Subject: [PATCH 013/486] Set required tsc version for depended package --- types/redux-actions/index.d.ts | 10 ++++------ types/redux-promise/index.d.ts | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/types/redux-actions/index.d.ts b/types/redux-actions/index.d.ts index d909fcfc7a..cc8e813e7c 100644 --- a/types/redux-actions/index.d.ts +++ b/types/redux-actions/index.d.ts @@ -41,23 +41,21 @@ export interface ReducerNextThrowMeta { throw?(state: State, action: ActionMeta): State; } -export type ActionFunctions = - ActionFunction> | - ActionFunctionAny>; +export type ActionFunctions = ActionFunctionAny>; export type Reducer = (state: State, action: Action) => State; export type ReducerMeta = (state: State, action: ActionMeta) => State; /** argument inferring borrowed from lodash definitions */ -export type ActionFunction = (t1?: T1, t2?: T2, t3?: T3, t4?: T4) => R; +export type ActionFunction = (t1?: T1, t2?: T2, t3?: T3, t4?: T4) => R; export type ActionFunctionAny = (...args: any[]) => R; export function createAction( actionType: string ): ActionFunction>; -export function createAction( +export function createAction( actionType: string, payloadCreator: ActionFunction ): ActionFunction, Arg1, Arg2, Arg3, Arg4>; @@ -102,7 +100,7 @@ export function handleActions( export function combineActions(...actionTypes: Array | string>): string; -export interface ActionMap { +export interface ActionMap { [actionType: string]: ActionMap | ActionFunctionAny | diff --git a/types/redux-promise/index.d.ts b/types/redux-promise/index.d.ts index 415709cd4e..5c0a5b3f50 100644 --- a/types/redux-promise/index.d.ts +++ b/types/redux-promise/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/acdlite/redux-promise // Definitions by: Rogelio Morrell Caballero , Kaur Kuut // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 import * as Redux from 'redux'; From 271314f3efb4fb64716b9bb7f5b6af4e60688256 Mon Sep 17 00:00:00 2001 From: mikeyGlitz Date: Tue, 12 Sep 2017 09:45:14 -0400 Subject: [PATCH 014/486] Update to index.d.ts Added change suggested by @pocesar --- types/react-bootstrap-table/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-bootstrap-table/index.d.ts b/types/react-bootstrap-table/index.d.ts index 8efc965c10..80c6eb3935 100644 --- a/types/react-bootstrap-table/index.d.ts +++ b/types/react-bootstrap-table/index.d.ts @@ -87,7 +87,7 @@ export interface BootstrapTableProps extends Props { /** If set, data is remote (use also fetchInfo) */ - remote?: (remobeObj: RemoteObjSpec) => RemoteObjSpec | boolean, // Updated to support ^3.0.0 + remote?: boolean | (remobeObj: RemoteObjSpec) => RemoteObjSpec, // 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 From c7cb14ca453d5a1f4de25b9033fa303d2af359b3 Mon Sep 17 00:00:00 2001 From: mikeyGlitz Date: Tue, 12 Sep 2017 09:47:47 -0400 Subject: [PATCH 015/486] Updated test to reflect remote changes Second class, remoteBool to test for remote is boolean --- .../react-bootstrap-table-tests.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/types/react-bootstrap-table/react-bootstrap-table-tests.tsx b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx index 76e5bb79b7..e0111410f6 100644 --- a/types/react-bootstrap-table/react-bootstrap-table-tests.tsx +++ b/types/react-bootstrap-table/react-bootstrap-table-tests.tsx @@ -101,6 +101,22 @@ class RemoteProps extends React.Component { ); } } + +class RemoteBool extends React.Component { + render() { + return ( + + 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() { From c5479ceab49a14f592b16883f912bccc371e2e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ars=C3=A8ne=20von=20Wyss?= Date: Tue, 12 Sep 2017 17:13:34 +0200 Subject: [PATCH 016/486] mfiles: Added support for application platform property --- types/mfiles/index.d.ts | 3 +++ types/mfiles/mfiles-tests.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/mfiles/index.d.ts b/types/mfiles/index.d.ts index db31565309..c82377d1fe 100644 --- a/types/mfiles/index.d.ts +++ b/types/mfiles/index.d.ts @@ -3,6 +3,8 @@ // Definitions by: Arsène von Wyss // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare const MFExtApplicationPlatformWeb: any; + interface IAccessControlEntry { ChangePermissionsPermission: MFiles.MFPermission; EditPermission: MFiles.MFPermission; @@ -6175,6 +6177,7 @@ declare namespace MFiles { const ApplicationPath: string; const CLSID: ICLSIDs; + const CurrentApplicationPlatform: any; function CreateInstance(name: string): any; function CreateObjectCLR(assemblyFile: string, className: string): any; diff --git a/types/mfiles/mfiles-tests.ts b/types/mfiles/mfiles-tests.ts index 4271042137..8c0dcd45aa 100644 --- a/types/mfiles/mfiles-tests.ts +++ b/types/mfiles/mfiles-tests.ts @@ -72,7 +72,10 @@ function setTheme(shellFrame: IShellFrame) { function OnNewShellUI(shellUI: IShellUI) { shellUI.Events.Register(MFiles.Event.NewShellFrame, newShellFrameHandler); shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, newShellFrameHandler); - const html = ` `; + if (MFiles.CurrentApplicationPlatform !== MFExtApplicationPlatformWeb) { + // We are not executing on the web, AxtiveX is available + const html = ` `; + } } function newShellFrameHandler(shellFrame: IShellFrame) { From 1124f35ea303665d40ba5ba2bf303a49552cb34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D1=80=D0=B0=D0=BF=D0=B5=D0=B7=D0=B0=20=D0=9E=D0=BB?= =?UTF-8?q?=D0=B5=D0=B3?= Date: Tue, 12 Sep 2017 19:01:50 +0300 Subject: [PATCH 017/486] bootstrap-datepicker - append all available datepicker events --- types/bootstrap-datepicker/index.d.ts | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/types/bootstrap-datepicker/index.d.ts b/types/bootstrap-datepicker/index.d.ts index 02eda0fba8..a1beefa467 100644 --- a/types/bootstrap-datepicker/index.d.ts +++ b/types/bootstrap-datepicker/index.d.ts @@ -6,12 +6,18 @@ /// +type DatepickerEvents = "show"|"hide"|"clearDate"|"changeDate"|"changeMonth"|"changeYear"|"changeDecade"|"changeCentury"; + +type DatepickerViewModes = 0|"days"|1|"months"|2|"years"|3|"decades"|4|"centuries"|"millenium"; + +type DatepickerOrientations = "auto"|"left top"|"left bottom"|"right top"|"right bottom"; + /** * All options that take a “Date” can handle a Date object; a String * formatted according to the given format; or a timedelta relative * to today, eg “-1d”, “+6m +1y”, etc, where valid units are “d” (day), * “w” (week), “m” (month), and “y” (year). - * + * * See online docs for more info: * https://bootstrap-datepicker.readthedocs.io/en/latest/options.html */ @@ -35,11 +41,11 @@ interface DatepickerOptions { daysOfWeekDisabled?: number[]; forceParse?: boolean; inputs?: any[]; - minViewMode?: 0|"days"|1|"months"|2|"years"|3|"decades"|4|"centuries"|"millenium"; - maxViewMode?: 0|"days"|1|"months"|2|"years"|3|"decades"|4|"centuries"|"millenium"; + minViewMode?: DatepickerViewModes; + maxViewMode?: DatepickerViewModes; multidate?: boolean|number; multidateSeparator?: string; - orientation?: "auto"|"left top"|"left bottom"|"right top"|"right bottom"; + orientation?: DatepickerOrientations; assumeNearbyYear?: boolean|number; viewMode?: string; templates?: any; @@ -91,10 +97,10 @@ interface JQuery { datepicker(methodName: string, params: any): any; datepicker(options: DatepickerOptions): JQuery; - off(events: "changeDate", selector?: string, handler?: (eventObject: DatepickerEventObject) => any): JQuery; - off(events: "changeDate", handler: (eventObject: DatepickerEventObject) => any): JQuery; + off(events: DatepickerEvents, selector?: string, handler?: (eventObject: DatepickerEventObject) => any): JQuery; + off(events: DatepickerEvents, handler: (eventObject: DatepickerEventObject) => any): JQuery; - on(events: "changeDate", selector: string, data: any, handler?: (eventObject: DatepickerEventObject) => any): JQuery; - on(events: "changeDate", selector: string, handler: (eventObject: DatepickerEventObject) => any): JQuery; - on(events: 'changeDate', handler: (eventObject: DatepickerEventObject) => any): JQuery; + on(events: DatepickerEvents, selector: string, data: any, handler?: (eventObject: DatepickerEventObject) => any): JQuery; + on(events: DatepickerEvents, selector: string, handler: (eventObject: DatepickerEventObject) => any): JQuery; + on(events: DatepickerEvents, handler: (eventObject: DatepickerEventObject) => any): JQuery; } From bcf29e5d3bf88c3118af852fbf586aa20ff7c781 Mon Sep 17 00:00:00 2001 From: Deyan Kamburov Date: Tue, 12 Sep 2017 19:58:11 +0300 Subject: [PATCH 018/486] Update Ignite UI typing definition according the latest 17.1 build --- types/ignite-ui/index.d.ts | 3925 +++++++++++++++++++++++++++++++++--- 1 file changed, 3602 insertions(+), 323 deletions(-) diff --git a/types/ignite-ui/index.d.ts b/types/ignite-ui/index.d.ts index 970875a49b..97a84af16b 100644 --- a/types/ignite-ui/index.d.ts +++ b/types/ignite-ui/index.d.ts @@ -8868,6 +8868,13 @@ interface IgQRCodeBarcode { */ height?: string|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; + /** * Gets or sets the brush to use to fill the backing of the barcode. */ @@ -8954,46 +8961,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 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. + * "version1" Version1 defines size of 21x21 modules for the symbol. + * "version2" Version2 defines size of 25x25 modules for the symbol. + * "version3" Version3 defines size of 29x29 modules for the symbol. + * "version4" Version4 defines size of 33x33 modules for the symbol. + * "version5" Version5 defines size of 37x37 modules for the symbol. + * "version6" Version6 defines size of 41x41 modules for the symbol. + * "version7" Version7 defines size of 45x45 modules for the symbol. + * "version8" Version8 defines size of 49x49 modules for the symbol. + * "version9" Version9 defines size of 53x53 modules for the symbol. + * "version10" Version10 defines size of 57x57 modules for the symbol. + * "version11" Version11 defines size of 61x61 modules for the symbol. + * "version12" Version12 defines size of 65x65 modules for the symbol. + * "version13" Version13 defines size of 69x69 modules for the symbol. + * "version14" Version14 defines size of 73x73 modules for the symbol. + * "version15" Version15 defines size of 77x77 modules for the symbol. + * "version16" Version16 defines size of 81x81 modules for the symbol. + * "version17" Version17 defines size of 85x85 modules for the symbol. + * "version18" Version18 defines size of 89x89 modules for the symbol. + * "version19" Version19 defines size of 93x93 modules for the symbol. + * "version20" Version20 defines size of 97x97 modules for the symbol. + * "version21" Version21 defines size of 101x101 modules for the symbol. + * "version22" Version22 defines size of 105x105 modules for the symbol. + * "version23" Version23 defines size of 109x109 modules for the symbol. + * "version24" Version24 defines size of 113x113 modules for the symbol. + * "version25" Version25 defines size of 117x117 modules for the symbol. + * "version26" Version26 defines size of 121x121 modules for the symbol. + * "version27" Version27 defines size of 125x125 modules for the symbol. + * "version28" Version28 defines size of 129x129 modules for the symbol. + * "version29" Version29 defines size of 133x133 modules for the symbol. + * "version30" Version30 defines size of 137x137 modules for the symbol. + * "version31" Version31 defines size of 141x141 modules for the symbol. + * "version32" Version32 defines size of 145x145 modules for the symbol. + * "version33" Version33 defines size of 149x149 modules for the symbol. + * "version34" Version34 defines size of 153x153 modules for the symbol. + * "version35" Version35 defines size of 157x157 modules for the symbol. + * "version36" Version36 defines size of 161x161 modules for the symbol. + * "version37" Version37 defines size of 165x165 modules for the symbol. + * "version38" Version38 defines size of 169x169 modules for the symbol. + * "version39" Version39 defines size of 173x173 modules for the symbol. + * "version40" Version40 defines size of 177x177 modules for the symbol. */ sizeVersion?: string; @@ -9116,6 +9123,22 @@ interface JQuery { */ igQRCodeBarcode(optionLiteral: 'option', optionName: "height", optionValue: string|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. + */ + igQRCodeBarcode(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. + */ + igQRCodeBarcode(optionLiteral: 'option', optionName: "pixelScalingRatio", optionValue: number): void; + /** * Gets the brush to use to fill the backing of the barcode. */ @@ -9640,7 +9663,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. */ @@ -9648,7 +9671,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. @@ -9658,7 +9681,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. @@ -12266,7 +12289,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. */ @@ -12274,7 +12297,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. @@ -12284,7 +12307,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. @@ -16953,7 +16976,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. */ @@ -16961,7 +16984,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. @@ -16971,7 +16994,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. @@ -16989,7 +17012,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. @@ -16998,7 +17021,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. @@ -22096,8 +22119,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; @@ -22159,6 +22182,14 @@ interface IgComboMethods { */ filter(texts?: Object, event?: Object): Object; + /** + * Creates expressions for filtering. + * + * @param expressions Filter by array of objects, such as each object represents filtering expression. + * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [filtering](ui.igcombo#events:filtering) and [filtered](ui.igcombo#events:filtered) events. + */ + filterByExpressions(expressions: any[], event?: Object): Object; + /** * Clears filtering. * @@ -22419,6 +22450,7 @@ interface JQuery { igCombo(methodName: "filteredItems"): any[]; igCombo(methodName: "selectedItems"): any[]; igCombo(methodName: "filter", texts?: Object, event?: Object): Object; + igCombo(methodName: "filterByExpressions", expressions: any[], event?: Object): Object; igCombo(methodName: "clearFiltering", event?: Object): Object; igCombo(methodName: "openDropDown", callback?: Function, focusCombo?: boolean, event?: Object): Object; igCombo(methodName: "closeDropDown", callback?: Function, event?: Object): Object; @@ -22523,14 +22555,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. @@ -22637,14 +22669,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. @@ -23606,11 +23638,11 @@ interface AnimationEndedEventUIParam { action?: any; } -interface FocusEvent { - (event: Event, ui: FocusEventUIParam): void; +interface IgFocusEvent { + (event: Event, ui: IgFocusEventUIParam): void; } -interface FocusEventUIParam { +interface IgFocusEventUIParam { /** * Used to obtain a reference to the igDialog. */ @@ -23962,7 +23994,7 @@ interface IgDialog { * Use evt to obtain the browser event. * Use ui.owner to obtain a reference to the igDialog. */ - focus?: FocusEvent; + focus?: IgFocusEvent; /** * Event which is raised when the dialog or its content loses focus. @@ -23986,7 +24018,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. */ @@ -23999,10 +24031,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. */ @@ -24010,42 +24042,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; @@ -24826,7 +24858,7 @@ interface JQuery { * Use evt to obtain the browser event. * Use ui.owner to obtain a reference to the igDialog. */ - igDialog(optionLiteral: 'option', optionName: "focus"): FocusEvent; + igDialog(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** * Event which is raised when the dialog or its content gets focus. @@ -24837,7 +24869,7 @@ interface JQuery { * * @optionValue Define event handler function. */ - igDialog(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + igDialog(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** * Event which is raised when the dialog or its content loses focus. @@ -25327,7 +25359,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. */ @@ -25335,7 +25367,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. @@ -25345,7 +25377,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. @@ -26017,12 +26049,12 @@ interface ValueChangedEventUIParam { owner?: any; /** - * Used to obtain the new value. + * Used to obtain the value entered from the user after internal formatting. */ newValue?: any; /** - * Used to obtain the original value. + * Used to obtain the value entered from the user before internal formatting. */ originalValue?: any; @@ -26179,7 +26211,7 @@ interface IgBaseEditor { * Use ui.element to obtain a reference to the event target. * Use ui.editorInput to get a reference to the editor field. */ - focus?: FocusEvent; + focus?: IgFocusEvent; /** * Event which is raised on keydown event. @@ -26226,8 +26258,8 @@ interface IgBaseEditor { * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. * Function takes arguments evt and ui. * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.originalValue to obtain the original value. + * Use ui.newValue to obtain the value entered from the user after internal formatting. + * Use ui.originalValue to obtain the value entered from the user before internal formatting. * Use ui.editorInput to obtain reference to the editor input. */ valueChanged?: ValueChangedEvent; @@ -26649,6 +26681,14 @@ interface IgTextEditor { */ suppressNotifications?: boolean; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + suppressKeyboard?: boolean; + /** * Gets/Sets the width of the control. * @@ -26861,7 +26901,7 @@ interface IgTextEditor { * Use ui.element to obtain a reference to the event target. * Use ui.editorInput to get a reference to the editor field. */ - focus?: FocusEvent; + focus?: IgFocusEvent; /** * Event which is raised on keydown event. @@ -26908,8 +26948,8 @@ interface IgTextEditor { * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. * Function takes arguments evt and ui. * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.originalValue to obtain the original value. + * Use ui.newValue to obtain the value entered from the user after internal formatting. + * Use ui.originalValue to obtain the value entered from the user before internal formatting. * Use ui.editorInput to obtain reference to the editor input. */ valueChanged?: ValueChangedEvent; @@ -26992,7 +27032,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. */ @@ -27414,6 +27454,14 @@ interface IgNumericEditor { */ suppressNotifications?: boolean; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + suppressKeyboard?: boolean; + /** * Gets/Sets the width of the control. * @@ -27637,7 +27685,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. */ @@ -28003,6 +28051,14 @@ interface IgCurrencyEditor { */ suppressNotifications?: boolean; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + suppressKeyboard?: boolean; + /** * Gets/Sets the width of the control. * @@ -28471,6 +28527,14 @@ interface IgPercentEditor { */ suppressNotifications?: boolean; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + suppressKeyboard?: boolean; + /** * Gets/Sets the width of the control. * @@ -28535,7 +28599,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. */ @@ -28755,6 +28819,7 @@ interface IgMaskEditor { * */ value?: any; + suppressKeyboard?: boolean; /** * Gets/Sets the horizontal alignment of the text in the editor. @@ -28959,7 +29024,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. */ @@ -28983,21 +29048,21 @@ interface IgDateEditor { * Note! This option doesn't use the dateInputFormat to extract the date. * */ - value?: Object; + value?: Date; /** * 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 dateInputFormat to extract the date. * */ - minValue?: Object; + minValue?: Date; /** * 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 dateInputFormat to extract the date. * */ - maxValue?: Object; + maxValue?: Date; /** * Gets/Sets format of date while editor has no focus. @@ -29212,6 +29277,7 @@ interface IgDateEditor { * This option is inherited from a parent widget and it's not applicable for igDateEditor */ toLower?: boolean; + suppressKeyboard?: boolean; /** * Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. @@ -29414,17 +29480,17 @@ interface IgDateEditorMethods { /** * Gets/Sets editor value. * - * Note! This option doesn't use the dateInputFormat 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; + value(newValue?: Date): 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; + getSelectedDate(): Date; /** * Sets selected date. This method can be used when dataMode is set as either displayModeText or editModeText. @@ -29432,7 +29498,7 @@ interface IgDateEditorMethods { * * @param date */ - selectDate(date: Object): void; + selectDate(date: Date): void; /** * Increases the date or time period, depending on the current cursor position. @@ -29557,26 +29623,33 @@ interface IgDatePicker { */ listWidth?: number; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * + */ + suppressKeyboard?: boolean; + /** * 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 dateInputFormat to extract the date. * */ - value?: Object; + value?: Date; /** * 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 dateInputFormat to extract the date. * */ - minValue?: Object; + minValue?: Date; /** * 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 dateInputFormat to extract the date. * */ - maxValue?: Object; + maxValue?: Date; /** * Gets/Sets format of date while editor has no focus. @@ -30003,17 +30076,17 @@ interface IgDatePickerMethods { /** * Gets/Sets editor value. * - * Note! This option doesn't use the dateInputFormat 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; + value(newValue?: Date): 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; + getSelectedDate(): Date; /** * Sets selected date. This method can be used when dataMode is set as either displayModeText or editModeText. @@ -30021,7 +30094,7 @@ interface IgDatePickerMethods { * * @param date */ - selectDate(date: Object): void; + selectDate(date: Date): void; /** * Increases the date or time period, depending on the current cursor position. @@ -30243,7 +30316,7 @@ interface IgCheckboxEditor { * Use ui.element to obtain a reference to the event target. * Use ui.editorInput to get a reference to the editor field. */ - focus?: FocusEvent; + focus?: IgFocusEvent; /** * Event which is raised on keydown event. @@ -30287,10 +30360,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 */ @@ -30682,7 +30755,7 @@ interface JQuery { * Use ui.element to obtain a reference to the event target. * Use ui.editorInput to get a reference to the editor field. */ - igBaseEditor(optionLiteral: 'option', optionName: "focus"): FocusEvent; + igBaseEditor(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** * Event which is raised when input field of editor gets focus. @@ -30693,7 +30766,7 @@ interface JQuery { * * @optionValue Define event handler function. */ - igBaseEditor(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + igBaseEditor(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** * Event which is raised on keydown event. @@ -30789,8 +30862,8 @@ interface JQuery { * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. * Function takes arguments evt and ui. * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.originalValue to obtain the original value. + * Use ui.newValue to obtain the value entered from the user after internal formatting. + * Use ui.originalValue to obtain the value entered from the user before internal formatting. * Use ui.editorInput to obtain reference to the editor input. */ igBaseEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; @@ -30799,8 +30872,8 @@ interface JQuery { * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. * Function takes arguments evt and ui. * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.originalValue to obtain the original value. + * Use ui.newValue to obtain the value entered from the user after internal formatting. + * Use ui.originalValue to obtain the value entered from the user before internal formatting. * Use ui.editorInput to obtain reference to the editor input. * * @optionValue Define event handler function. @@ -31219,6 +31292,24 @@ interface JQuery { */ igTextEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + igTextEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + * + * @optionValue New value to be set. + */ + igTextEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets/Sets the width of the control. * @@ -31674,7 +31765,7 @@ interface JQuery { * Use ui.element to obtain a reference to the event target. * Use ui.editorInput to get a reference to the editor field. */ - igTextEditor(optionLiteral: 'option', optionName: "focus"): FocusEvent; + igTextEditor(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** * Event which is raised when input field of editor gets focus. @@ -31685,7 +31776,7 @@ interface JQuery { * * @optionValue Define event handler function. */ - igTextEditor(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + igTextEditor(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** * Event which is raised on keydown event. @@ -31781,8 +31872,8 @@ interface JQuery { * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. * Function takes arguments evt and ui. * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.originalValue to obtain the original value. + * Use ui.newValue to obtain the value entered from the user after internal formatting. + * Use ui.originalValue to obtain the value entered from the user before internal formatting. * Use ui.editorInput to obtain reference to the editor input. */ igTextEditor(optionLiteral: 'option', optionName: "valueChanged"): ValueChangedEvent; @@ -31791,8 +31882,8 @@ interface JQuery { * Event which is raised after the editor value is changed. It can be raised after loosing focus or on spin events. * Function takes arguments evt and ui. * Use ui.owner to obtain reference to igEditor. - * Use ui.newValue to obtain the new value. - * Use ui.originalValue to obtain the original value. + * Use ui.newValue to obtain the value entered from the user after internal formatting. + * Use ui.originalValue to obtain the value entered from the user before internal formatting. * Use ui.editorInput to obtain reference to the editor input. * * @optionValue Define event handler function. @@ -32471,6 +32562,24 @@ interface JQuery { */ igNumericEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + igNumericEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + * + * @optionValue New value to be set. + */ + igNumericEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets/Sets the width of the control. * @@ -33425,6 +33534,24 @@ interface JQuery { */ igCurrencyEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + * + * @optionValue New value to be set. + */ + igCurrencyEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets/Sets the width of the control. * @@ -34258,6 +34385,24 @@ interface JQuery { */ igPercentEditor(optionLiteral: 'option', optionName: "suppressNotifications", optionValue: boolean): void; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + */ + igPercentEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * Note: When drop down is opened the only way to close it will be using the drop down button. + * + * + * @optionValue New value to be set. + */ + igPercentEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets/Sets the width of the control. * @@ -34734,6 +34879,14 @@ interface JQuery { */ igMaskEditor(optionLiteral: 'option', optionName: "value", optionValue: any): void; + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + */ + igMaskEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets/Sets the horizontal alignment of the text in the editor. * @@ -35072,9 +35225,9 @@ interface JQuery { igMaskEditor(methodName: string, ...methodParams: any[]): any; } interface JQuery { - igDateEditor(methodName: "value", newValue?: Object): Object; - igDateEditor(methodName: "getSelectedDate"): Object; - igDateEditor(methodName: "selectDate", date: Object): void; + igDateEditor(methodName: "value", newValue?: Date): Date; + igDateEditor(methodName: "getSelectedDate"): Date; + igDateEditor(methodName: "selectDate", date: Date): void; igDateEditor(methodName: "spinUp", delta?: number): void; igDateEditor(methodName: "spinDown", delta?: number): void; igDateEditor(methodName: "spinUpButton"): string; @@ -35094,7 +35247,7 @@ interface JQuery { * Note! This option doesn't use the dateInputFormat to extract the date. * */ - igDateEditor(optionLiteral: 'option', optionName: "value"): Object; + igDateEditor(optionLiteral: 'option', optionName: "value"): Date; /** * /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. @@ -35103,14 +35256,14 @@ interface JQuery { * * @optionValue New value to be set. */ - igDateEditor(optionLiteral: 'option', optionName: "value", optionValue: Object): void; + igDateEditor(optionLiteral: 'option', optionName: "value", optionValue: Date): void; /** * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * */ - igDateEditor(optionLiteral: 'option', optionName: "minValue"): Object; + igDateEditor(optionLiteral: 'option', optionName: "minValue"): Date; /** * 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. @@ -35119,14 +35272,14 @@ interface JQuery { * * @optionValue New value to be set. */ - igDateEditor(optionLiteral: 'option', optionName: "minValue", optionValue: Object): void; + igDateEditor(optionLiteral: 'option', optionName: "minValue", optionValue: Date): void; /** * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * */ - igDateEditor(optionLiteral: 'option', optionName: "maxValue"): Object; + igDateEditor(optionLiteral: 'option', optionName: "maxValue"): Date; /** * 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. @@ -35135,7 +35288,7 @@ interface JQuery { * * @optionValue New value to be set. */ - igDateEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: Object): void; + igDateEditor(optionLiteral: 'option', optionName: "maxValue", optionValue: Date): void; /** * Gets/Sets format of date while editor has no focus. @@ -35595,6 +35748,14 @@ interface JQuery { */ igDateEditor(optionLiteral: 'option', optionName: "toLower", optionValue: boolean): void; + /** + */ + igDateEditor(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + */ + igDateEditor(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets custom regional settings for editor. If it is string, then $.ig.regional[stringValue] is assumed. * @@ -36015,9 +36176,9 @@ interface JQuery { igDatePicker(methodName: "dropDownButton"): string; igDatePicker(methodName: "dropDownVisible"): boolean; igDatePicker(methodName: "destroy"): void; - igDatePicker(methodName: "value", newValue?: Object): Object; - igDatePicker(methodName: "getSelectedDate"): Object; - igDatePicker(methodName: "selectDate", date: Object): void; + igDatePicker(methodName: "value", newValue?: Date): Date; + igDatePicker(methodName: "getSelectedDate"): Date; + igDatePicker(methodName: "selectDate", date: Date): void; igDatePicker(methodName: "spinUp", delta?: number): void; igDatePicker(methodName: "spinDown", delta?: number): void; igDatePicker(methodName: "spinUpButton"): string; @@ -36142,12 +36303,28 @@ interface JQuery { */ igDatePicker(optionLiteral: 'option', optionName: "listWidth", optionValue: number): void; + /** + * Gets/Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * + */ + igDatePicker(optionLiteral: 'option', optionName: "suppressKeyboard"): boolean; + + /** + * /Sets whether the onscreen keyboard (if available on device) should be shown when the dropdown button is clicked/tapped. This option prevents initial focus or removes it when the drop button is clicked/tapped. + * Note: The option does not perform device detection so its behavior is always active if enabled. + * + * + * @optionValue New value to be set. + */ + igDatePicker(optionLiteral: 'option', optionName: "suppressKeyboard", optionValue: boolean): void; + /** * Gets/Sets the value of the editor. Date object can be set as value. String can be set and the editor will pass it to the Date object constructor and use the corresponding Date object as the value. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * */ - igDatePicker(optionLiteral: 'option', optionName: "value"): Object; + igDatePicker(optionLiteral: 'option', optionName: "value"): Date; /** * /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. @@ -36156,14 +36333,14 @@ interface JQuery { * * @optionValue New value to be set. */ - igDatePicker(optionLiteral: 'option', optionName: "value", optionValue: Object): void; + igDatePicker(optionLiteral: 'option', optionName: "value", optionValue: Date): void; /** * Gets the minimum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * */ - igDatePicker(optionLiteral: 'option', optionName: "minValue"): Object; + igDatePicker(optionLiteral: 'option', optionName: "minValue"): Date; /** * 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. @@ -36172,14 +36349,14 @@ interface JQuery { * * @optionValue New value to be set. */ - igDatePicker(optionLiteral: 'option', optionName: "minValue", optionValue: Object): void; + igDatePicker(optionLiteral: 'option', optionName: "minValue", optionValue: Date): void; /** * Gets the maximum value which can be entered in editor by user. Date object can be set as value. String value can be passed and the editor will use the javascript Date object constructor to create date object and will use it for the comparison. MVC date format can be used too. * Note! This option doesn't use the dateInputFormat to extract the date. * */ - igDatePicker(optionLiteral: 'option', optionName: "maxValue"): Object; + igDatePicker(optionLiteral: 'option', optionName: "maxValue"): Date; /** * 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. @@ -36188,7 +36365,7 @@ interface JQuery { * * @optionValue New value to be set. */ - igDatePicker(optionLiteral: 'option', optionName: "maxValue", optionValue: Object): void; + igDatePicker(optionLiteral: 'option', optionName: "maxValue", optionValue: Date): void; /** * Gets/Sets format of date while editor has no focus. @@ -37413,7 +37590,7 @@ interface JQuery { * Use ui.element to obtain a reference to the event target. * Use ui.editorInput to get a reference to the editor field. */ - igCheckboxEditor(optionLiteral: 'option', optionName: "focus"): FocusEvent; + igCheckboxEditor(optionLiteral: 'option', optionName: "focus"): IgFocusEvent; /** * Event which is raised when input field of editor gets focus. @@ -37424,7 +37601,7 @@ interface JQuery { * * @optionValue Define event handler function. */ - igCheckboxEditor(optionLiteral: 'option', optionName: "focus", optionValue: FocusEvent): void; + igCheckboxEditor(optionLiteral: 'option', optionName: "focus", optionValue: IgFocusEvent): void; /** * Event which is raised on keydown event. @@ -37917,7 +38094,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. */ @@ -37925,7 +38102,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. @@ -37935,7 +38112,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. @@ -38640,6 +38817,20 @@ interface RowsRequestingEvent { } interface RowsRequestingEventUIParam { + /** + * Gets a reference to igGridAppendRowsOnDemand. + */ + owner?: any; + + /** + * Gets the next chunk index. + */ + chunkIndex?: number; + + /** + * Gets the chunk size. + */ + chunkSize?: number; } interface RowsRequestedEvent { @@ -38647,6 +38838,25 @@ interface RowsRequestedEvent { } interface RowsRequestedEventUIParam { + /** + * Gets a reference to igGridAppendRowsOnDemand. + */ + owner?: any; + + /** + * Gets the next chunk index. + */ + chunkIndex?: number; + + /** + * Gets the chunk size. + */ + chunkSize?: number; + + /** + * Gets the requested rows. + */ + rows?: any[]; } interface IgGridAppendRowsOnDemand { @@ -38909,6 +39119,35 @@ interface CellsMergingEvent { } interface CellsMergingEventUIParam { + /** + * Gets a reference to the row the merged group starts in. + */ + row?: string; + + /** + * Gets the index of the row the merged group starts in. + */ + rowIndex?: number; + + /** + * Gets the key of the row the merged group starts in. + */ + rowKey?: any; + + /** + * Gets reference to igGridCellMerging. + */ + owner?: any; + + /** + * Gets a reference to the igGrid the igGridCellMerging are initialized for. + */ + grid?: any; + + /** + * Gets the cells value which is repeated and caused the merged group to be created. + */ + value?: any; } interface CellsMergedEvent { @@ -38916,6 +39155,40 @@ interface CellsMergedEvent { } interface CellsMergedEventUIParam { + /** + * Gets a reference to the row the merged group starts in. + */ + row?: string; + + /** + * Gets the index of the row the merged group starts in. + */ + rowIndex?: number; + + /** + * Gets the key of the row the merged group starts in. + */ + rowKey?: any; + + /** + * Gets reference to igGridCellMerging. + */ + owner?: any; + + /** + * Gets a reference to the igGrid the igGridCellMerging are initialized for. + */ + grid?: any; + + /** + * Gets the cells value which is repeated and caused the merged group to be created. + */ + value?: any; + + /** + * Gets the total count of cells that were merged. + */ + count?: number; } interface IgGridCellMerging { @@ -39623,6 +39896,10 @@ interface MovingDialogOpeningEvent { } interface MovingDialogOpeningEventUIParam { + /** + * Gets a reference to the moving dialog element. This is a jQuery object. + */ + movingDialogElement?: string; } interface MovingDialogOpenedEvent { @@ -39630,6 +39907,10 @@ interface MovingDialogOpenedEvent { } interface MovingDialogOpenedEventUIParam { + /** + * Gets a reference to the moving dialog element. This is a jQuery object. + */ + movingDialogElement?: string; } interface MovingDialogDraggedEvent { @@ -39637,6 +39918,20 @@ interface MovingDialogDraggedEvent { } interface MovingDialogDraggedEventUIParam { + /** + * Gets a reference to the moving dialog element. This is a jQuery object. + */ + movingDialogElement?: string; + + /** + * Gets the original position of the moving dialog div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Gets the current position of the moving dialog div as { top, left } object, relative to the page. + */ + position?: any; } interface MovingDialogClosingEvent { @@ -39644,6 +39939,10 @@ interface MovingDialogClosingEvent { } interface MovingDialogClosingEventUIParam { + /** + * Gets a reference to the moving dialog element. This is a jQuery object. + */ + movingDialogElement?: string; } interface MovingDialogClosedEvent { @@ -39651,6 +39950,10 @@ interface MovingDialogClosedEvent { } interface MovingDialogClosedEventUIParam { + /** + * Gets a reference to the moving dialog element. This is a jQuery object. + */ + movingDialogElement?: string; } interface MovingDialogContentsRenderingEvent { @@ -39658,6 +39961,10 @@ interface MovingDialogContentsRenderingEvent { } interface MovingDialogContentsRenderingEventUIParam { + /** + * Gets a reference to the Moving Dialog element. This is a jQuery object. + */ + movingDialog?: string; } interface MovingDialogContentsRenderedEvent { @@ -39665,6 +39972,10 @@ interface MovingDialogContentsRenderedEvent { } interface MovingDialogContentsRenderedEventUIParam { + /** + * Gets a reference to the Moving Dialog element. This is a jQuery object. + */ + movingDialog?: string; } interface MovingDialogMoveUpButtonPressedEvent { @@ -39672,6 +39983,25 @@ interface MovingDialogMoveUpButtonPressedEvent { } interface MovingDialogMoveUpButtonPressedEventUIParam { + /** + * Gets a reference to the Moving Dialog element. This is a jQuery object. + */ + movingDialog?: string; + + /** + * Gets the column key of the column that was being moved. + */ + columnKey?: string; + + /** + * Gets the column index of the column that was being moved. + */ + columnIndex?: number; + + /** + * Gets the new column index of the column that was being moved. + */ + targetIndex?: number; } interface MovingDialogMoveDownButtonPressedEvent { @@ -39679,6 +40009,25 @@ interface MovingDialogMoveDownButtonPressedEvent { } interface MovingDialogMoveDownButtonPressedEventUIParam { + /** + * Gets a reference to the Moving Dialog element. This is a jQuery object. + */ + movingDialog?: string; + + /** + * Gets the column key of the column that was being moved. + */ + columnKey?: string; + + /** + * Gets the column index of the column that was being moved. + */ + columnIndex?: number; + + /** + * Gets the new column index of the column that was being moved. + */ + targetIndex?: number; } interface MovingDialogDragColumnMovingEvent { @@ -39686,6 +40035,25 @@ interface MovingDialogDragColumnMovingEvent { } interface MovingDialogDragColumnMovingEventUIParam { + /** + * Gets a reference to the Moving Dialog element. This is a jQuery object. + */ + movingDialog?: string; + + /** + * Gets the column key of the column that was being moved. + */ + columnKey?: string; + + /** + * Gets the column index of the column that was being moved. + */ + columnIndex?: number; + + /** + * Gets the new column index of the column that was being moved. + */ + targetIndex?: number; } interface MovingDialogDragColumnMovedEvent { @@ -39693,6 +40061,25 @@ interface MovingDialogDragColumnMovedEvent { } interface MovingDialogDragColumnMovedEventUIParam { + /** + * Gets a reference to the Moving Dialog element. This is a jQuery object. + */ + movingDialog?: string; + + /** + * Gets the column key of the column that was being moved. + */ + columnKey?: string; + + /** + * Gets the column index of the column that was being moved. + */ + columnIndex?: number; + + /** + * Gets the new column index of the column that was being moved. + */ + targetIndex?: number; } interface IgGridColumnMoving { @@ -40606,6 +40993,25 @@ interface ShowingEvent { } interface ShowingEventUIParam { + /** + * Gets the element the popover will show for. + */ + element?: string; + + /** + * Gets or set the content to be shown as a string. + */ + content?: string; + + /** + * Gets the popover element showing. + */ + popover?: string; + + /** + * Gets a reference to the %%WidgetName%% widget. + */ + owner?: any; } interface ShownEvent { @@ -40613,6 +41019,25 @@ interface ShownEvent { } interface ShownEventUIParam { + /** + * Gets the element the popover showed for. + */ + element?: string; + + /** + * Gets the content that was shown as a string. + */ + content?: string; + + /** + * Gets the popover element showing. + */ + popover?: string; + + /** + * Gets a reference to the %%WidgetName%% widget. + */ + owner?: any; } interface HidingEvent { @@ -40620,6 +41045,25 @@ interface HidingEvent { } interface HidingEventUIParam { + /** + * Gets the element the popover will hide for. + */ + element?: string; + + /** + * Gets the current content displayed in the popover as a string. + */ + content?: string; + + /** + * Gets the popover element hiding. + */ + popover?: string; + + /** + * Gets reference to the %%WidgetName%% widget. + */ + owner?: any; } interface HiddenEvent { @@ -40627,6 +41071,25 @@ interface HiddenEvent { } interface HiddenEventUIParam { + /** + * Gets the element the popover is hidden for. + */ + element?: string; + + /** + * Gets the content displayed in the popover as a string. + */ + content?: string; + + /** + * Gets the popover element hidden. + */ + popover?: string; + + /** + * Gets reference to the %%WidgetName%% widget. + */ + owner?: any; } interface IgGridFeatureChooserPopover { @@ -40638,8 +41101,9 @@ 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 priority specified by the [directionPriority](ui.igpopover#options:directionPriority) property + * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.%%WidgetNameLowered%%#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 @@ -40649,13 +41113,15 @@ interface IgGridFeatureChooserPopover { /** * 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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#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 * + * * Valid values: * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start * "balanced" the popover is positioned at the middle of the target element @@ -40666,37 +41132,44 @@ interface IgGridFeatureChooserPopover { /** * defines width for the popover. leave null for auto. + * */ width?: number|string; /** * defines height for the popover. leave null for auto + * */ height?: number|string; /** * defines width the popover won't go under the value even if no specific one is set. + * */ minWidth?: number|string; /** * defines width the popover won't exceed even if no specific one is set. + * */ maxWidth?: number|string; /** * defines height the popover won't exceed even if no specific one is set. + * */ maxHeight?: number|string; /** * Sets the time popover fades in and out when showing/hiding + * */ animationDuration?: number; /** * sets the content for the popover container. If left null the content will be get from the target. * + * * Valid values: * "string" String content of the popover container * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element. @@ -40705,17 +41178,20 @@ interface IgGridFeatureChooserPopover { /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ selectors?: string; /** * Sets the content for the popover header + * */ headerTemplate?: IgPopoverHeaderTemplate; /** * sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * Valid values: * "mouseenter" the popover is shown on mouse enter in the target element * "click" the popover is shown on click on the target element @@ -40968,25 +41444,29 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "direction"): string; /** * Controls the direction in which the control shows relative to the target element * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "direction", optionValue: string): void; /** * Controls the 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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * * * @optionValue New value to be set. */ @@ -40994,132 +41474,154 @@ interface JQuery { /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "position"): string; /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "position", optionValue: string): void; /** * Defines width for the popover. leave null for auto. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "width"): number|string; /** * Defines width for the popover. leave null for auto. * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; /** * Defines height for the popover. leave null for auto + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "height"): number|string; /** * Defines height for the popover. leave null for auto * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; /** * Defines width the popover won't go under the value even if no specific one is set. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "minWidth"): number|string; /** * Defines width the popover won't go under the value even if no specific one is set. * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "minWidth", optionValue: number|string): void; /** * Defines width the popover won't exceed even if no specific one is set. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxWidth"): number|string; /** * Defines width the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxWidth", optionValue: number|string): void; /** * Defines height the popover won't exceed even if no specific one is set. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxHeight"): number|string; /** * Defines height the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "maxHeight", optionValue: number|string): void; /** * The time popover fades in and out when showing/hiding + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "animationDuration"): number; /** * Sets the time popover fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * The content for the popover container. If left null the content will be get from the target. + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; /** * Sets the content for the popover container. If left null the content will be get from the target. * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "contentTemplate", optionValue: string|Function): void; /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "selectors"): string; /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; /** * The content for the popover header + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "headerTemplate"): IgPopoverHeaderTemplate; /** * Sets the content for the popover header * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgPopoverHeaderTemplate): void; /** * The event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showOn"): string; /** * Sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * @optionValue New value to be set. */ igGridFeatureChooserPopover(optionLiteral: 'option', optionName: "showOn", optionValue: string): void; @@ -41456,6 +41958,25 @@ interface DataFilteringEvent { } interface DataFilteringEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets the column index. Applicable only when filtering mode is "simple". + */ + columnIndex?: number; + + /** + * Gets the column key. Applicable only when filtering mode is "simple". + */ + columnKey?: string; + + /** + * Gets the filtering expressions. Filtering expressions could be changed in this event handler and after that data binding is applied. In this way the user could control filtering more easily before applying data-binding. + */ + newExpressions?: any[]; } interface DataFilteredEvent { @@ -41463,6 +41984,25 @@ interface DataFilteredEvent { } interface DataFilteredEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets the column index. Applicable only when filtering mode is "simple". + */ + columnIndex?: number; + + /** + * Gets the column key. Applicable only when filtering mode is "simple". + */ + columnKey?: string; + + /** + * Gets the filtered expressions. + */ + expressions?: any[]; } interface FilterDialogOpeningEvent { @@ -41470,6 +42010,15 @@ interface FilterDialogOpeningEvent { } interface FilterDialogOpeningEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialog?: string; } interface FilterDialogOpenedEvent { @@ -41477,6 +42026,15 @@ interface FilterDialogOpenedEvent { } interface FilterDialogOpenedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialog?: string; } interface FilterDialogMovingEvent { @@ -41484,6 +42042,25 @@ interface FilterDialogMovingEvent { } interface FilterDialogMovingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to filtering dialog DOM element. + */ + dialog?: string; + + /** + * Gets the original position of the groupby dialog div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Gets the current position of the groupby dialog div as { top, left } object, relative to the page. + */ + position?: any; } interface FilterDialogFilterAddingEvent { @@ -41491,6 +42068,15 @@ interface FilterDialogFilterAddingEvent { } interface FilterDialogFilterAddingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to filters table body DOM element. + */ + filtersTableBody?: string; } interface FilterDialogFilterAddedEvent { @@ -41498,6 +42084,15 @@ interface FilterDialogFilterAddedEvent { } interface FilterDialogFilterAddedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filters table row DOM element. + */ + filter?: string; } interface FilterDialogClosingEvent { @@ -41505,6 +42100,10 @@ interface FilterDialogClosingEvent { } interface FilterDialogClosingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; } interface FilterDialogClosedEvent { @@ -41512,6 +42111,10 @@ interface FilterDialogClosedEvent { } interface FilterDialogClosedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; } interface FilterDialogContentsRenderingEvent { @@ -41519,6 +42122,15 @@ interface FilterDialogContentsRenderingEvent { } interface FilterDialogContentsRenderingEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialogElement?: string; } interface FilterDialogContentsRenderedEvent { @@ -41526,6 +42138,15 @@ interface FilterDialogContentsRenderedEvent { } interface FilterDialogContentsRenderedEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to the filtering dialog DOM element. + */ + dialogElement?: string; } interface FilterDialogFilteringEvent { @@ -41533,6 +42154,15 @@ interface FilterDialogFilteringEvent { } interface FilterDialogFilteringEventUIParam { + /** + * Gets reference to GridFiltering. + */ + owner?: any; + + /** + * Gets reference to filtering dialog DOM element. + */ + dialog?: string; } interface IgGridFiltering { @@ -43194,6 +43824,35 @@ interface CellClickEvent { } interface CellClickEventUIParam { + /** + * Gets a reference to cell DOM element. + */ + cellElement?: Element; + + /** + * Gets the row index. + */ + rowIndex?: number; + + /** + * Gets the row key. + */ + rowKey?: any; + + /** + * Gets the column index of the DOM element. + */ + colIndex?: number; + + /** + * Gets the column key. + */ + colKey?: string; + + /** + * Gets a reference to the grid. + */ + owner?: any; } interface CellRightClickEvent { @@ -43201,6 +43860,40 @@ interface CellRightClickEvent { } interface CellRightClickEventUIParam { + /** + * Gets a reference to cell DOM element. + */ + cellElement?: Element; + + /** + * Gets the row index. + */ + rowIndex?: number; + + /** + * Gets the row key. + */ + rowKey?: any; + + /** + * Gets the column index of the DOM element. + */ + colIndex?: number; + + /** + * Gets the column key. + */ + colKey?: string; + + /** + * Gets a reference to the row DOM element. + */ + row?: Element; + + /** + * Gets a reference to the grid. + */ + owner?: any; } interface DataRenderingEvent { @@ -43208,6 +43901,10 @@ interface DataRenderingEvent { } interface DataRenderingEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface DataRenderedEvent { @@ -43215,6 +43912,10 @@ interface DataRenderedEvent { } interface DataRenderedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface HeaderRenderingEvent { @@ -43222,6 +43923,10 @@ interface HeaderRenderingEvent { } interface HeaderRenderingEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface HeaderRenderedEvent { @@ -43229,6 +43934,15 @@ interface HeaderRenderedEvent { } interface HeaderRenderedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets a reference to headers table DOM element. + */ + table?: Element; } interface CaptionRenderingEvent { @@ -43236,6 +43950,10 @@ interface CaptionRenderingEvent { } interface CaptionRenderingEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface CaptionRenderedEvent { @@ -43243,6 +43961,15 @@ interface CaptionRenderedEvent { } interface CaptionRenderedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets a reference to the caption container. + */ + captionContainer?: Element; } interface FooterRenderingEvent { @@ -43250,6 +43977,10 @@ interface FooterRenderingEvent { } interface FooterRenderingEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface FooterRenderedEvent { @@ -43257,6 +43988,15 @@ interface FooterRenderedEvent { } interface FooterRenderedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets a reference to footers table DOM element. + */ + table?: Element; } interface HeaderCellRenderedEvent { @@ -43264,6 +44004,20 @@ interface HeaderCellRenderedEvent { } interface HeaderCellRenderedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets the column key. + */ + columnKey?: string; + + /** + * Gets a reference to header cell DOM element. + */ + th?: Element; } interface RowsRenderingEvent { @@ -43271,6 +44025,15 @@ interface RowsRenderingEvent { } interface RowsRenderingEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets reference to the grid's table body. + */ + tbody?: Element; } interface RowsRenderedEvent { @@ -43278,6 +44041,15 @@ interface RowsRenderedEvent { } interface RowsRenderedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets reference to the grid's table body. + */ + tbody?: Element; } interface SchemaGeneratedEvent { @@ -43285,6 +44057,20 @@ interface SchemaGeneratedEvent { } interface SchemaGeneratedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets a reference to data source schema. + */ + schema?: any; + + /** + * Gets reference to data source. + */ + dataSource?: any; } interface ColumnsCollectionModifiedEvent { @@ -43292,6 +44078,10 @@ interface ColumnsCollectionModifiedEvent { } interface ColumnsCollectionModifiedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface RequestErrorEvent { @@ -43299,6 +44089,20 @@ interface RequestErrorEvent { } interface RequestErrorEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; + + /** + * Gets the processed error message sent by the server + */ + message?: string; + + /** + * Gets a reference to the whole response object + */ + response?: any; } interface CreatedEvent { @@ -43306,6 +44110,10 @@ interface CreatedEvent { } interface CreatedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface DestroyedEvent { @@ -43313,6 +44121,10 @@ interface DestroyedEvent { } interface DestroyedEventUIParam { + /** + * Gets a reference to the grid. + */ + owner?: any; } interface IgGrid { @@ -43829,10 +44641,10 @@ interface IgGridMethods { /** * 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) + * 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. */ @@ -43993,25 +44805,25 @@ interface IgGridMethods { /** * 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; @@ -44027,7 +44839,7 @@ interface IgGridMethods { /** * 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. + * 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. @@ -44036,7 +44848,7 @@ interface IgGridMethods { /** * 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. + * 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. @@ -44069,7 +44881,7 @@ interface IgGridMethods { /** * Returns a record by a specified key (requires that primaryKey is set in the settings). - * That is a wrapper for this.dataSource.findRecordByKey(key). + * That is a wrapper for this.dataSource.findRecordByKey(key). * * @param key Primary key of the record */ @@ -44077,7 +44889,7 @@ interface IgGridMethods { /** * 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). + * That is a wrapper for this.dataSource.getDetachedRecord(t). * * @param t A transaction object. */ @@ -44085,19 +44897,19 @@ interface IgGridMethods { /** * 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(). + * 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(). + * 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(). + * That is a wrapper for this.dataSource.transactionsAsString(). */ transactionsAsString(): string; @@ -44125,8 +44937,8 @@ interface IgGridMethods { /** * 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. + * 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; @@ -44151,7 +44963,7 @@ interface IgGridMethods { /** * 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. + * 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) @@ -44160,7 +44972,7 @@ interface IgGridMethods { /** * 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. + * 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) @@ -44219,7 +45031,7 @@ interface IgGridMethods { /** * 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). + * 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 @@ -44249,9 +45061,9 @@ interface IgGridMethods { /** * 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. * * @param notToCallDestroy */ @@ -45477,6 +46289,40 @@ interface GroupedColumnsChangingEvent { } interface GroupedColumnsChangingEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the current groupedColumns. + */ + groupedColumns?: any[]; + + /** + * Gets the object of the new grouped columns that should be applied.(it is set ONLY if called from modal dialog) + */ + newGroupedColumns?: any; + + /** + * Gets a reference to the current column's key that's being grouped(not set if called from modal dialog). + */ + key?: string; + + /** + * Gets a reference to the current layout object, if any(not set if called from modal dialog). + */ + layout?: any; + + /** + * Gets a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog). + */ + grid?: any; + + /** + * Gets which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup. + */ + triggeredBy?: string; } interface GroupedColumnsChangedEvent { @@ -45484,6 +46330,35 @@ interface GroupedColumnsChangedEvent { } interface GroupedColumnsChangedEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the current groupedColumns. + */ + groupedColumns?: any[]; + + /** + * Gets a reference to the current column's key that's being grouped(not set if called from modal dialog). + */ + key?: string; + + /** + * Gets a reference to the current layout object, if any(not set if called from modal dialog). + */ + layout?: any; + + /** + * Gets a reference to the current child grid element, in case it's an hierarchical grid(not set if called from modal dialog). + */ + grid?: any; + + /** + * Gets which user interaction triggers the event - possible options are dragAndDrop|modalDialog|sortStateChanged|removeButton|regroup. + */ + triggeredBy?: string; } interface ModalDialogMovingEvent { @@ -45491,6 +46366,25 @@ interface ModalDialogMovingEvent { } interface ModalDialogMovingEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; + + /** + * Gets the original position of the GroupBy Dialog div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Gets the current position of the GroupBy Dialog div as { top, left } object, relative to the page. + */ + position?: any; } interface ModalDialogClosingEvent { @@ -45498,6 +46392,15 @@ interface ModalDialogClosingEvent { } interface ModalDialogClosingEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogClosedEvent { @@ -45505,6 +46408,15 @@ interface ModalDialogClosedEvent { } interface ModalDialogClosedEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogOpeningEvent { @@ -45512,6 +46424,15 @@ interface ModalDialogOpeningEvent { } interface ModalDialogOpeningEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogOpenedEvent { @@ -45519,6 +46440,15 @@ interface ModalDialogOpenedEvent { } interface ModalDialogOpenedEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogContentsRenderingEvent { @@ -45526,6 +46456,15 @@ interface ModalDialogContentsRenderingEvent { } interface ModalDialogContentsRenderingEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogContentsRenderedEvent { @@ -45533,6 +46472,15 @@ interface ModalDialogContentsRenderedEvent { } interface ModalDialogContentsRenderedEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogButtonApplyClickEvent { @@ -45540,6 +46488,30 @@ interface ModalDialogButtonApplyClickEvent { } interface ModalDialogButtonApplyClickEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; + + /** + * Gets the array of grouped columns. + */ + groupedColumns?: any[]; + + /** + * Gets the array of column layouts. + */ + groupedColumnLayouts?: any[]; + + /** + * Gets the array of sorted columns. + */ + sortingExpr?: any[]; } interface ModalDialogButtonResetClickEvent { @@ -45547,6 +46519,15 @@ interface ModalDialogButtonResetClickEvent { } interface ModalDialogButtonResetClickEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; } interface ModalDialogGroupingColumnEvent { @@ -45554,6 +46535,20 @@ interface ModalDialogGroupingColumnEvent { } interface ModalDialogGroupingColumnEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * The key of the column to be grouped. + */ + key?: string; + + /** + * Gets a reference to the current layout object, if any. + */ + layout?: any; } interface ModalDialogGroupColumnEvent { @@ -45561,6 +46556,25 @@ interface ModalDialogGroupColumnEvent { } interface ModalDialogGroupColumnEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * The key of the column to be grouped. + */ + key?: string; + + /** + * Gets a reference to the current groupedColumns. + */ + groupedColumns?: any[]; + + /** + * Gets a reference to the current layout object, if any. + */ + layout?: any; } interface ModalDialogUngroupingColumnEvent { @@ -45568,6 +46582,20 @@ interface ModalDialogUngroupingColumnEvent { } interface ModalDialogUngroupingColumnEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * The key of the column to be grouped. + */ + key?: string; + + /** + * Get a reference to the current layout object, if any. + */ + layout?: string; } interface ModalDialogUngroupColumnEvent { @@ -45575,6 +46603,25 @@ interface ModalDialogUngroupColumnEvent { } interface ModalDialogUngroupColumnEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets a reference to the current groupedColumns. + */ + groupedColumns?: any[]; + + /** + * Gets the key of the column to be grouped. + */ + key?: string; + + /** + * Get a reference to the current layout object, if any. + */ + layout?: any; } interface ModalDialogSortGroupedColumnEvent { @@ -45582,6 +46629,25 @@ interface ModalDialogSortGroupedColumnEvent { } interface ModalDialogSortGroupedColumnEventUIParam { + /** + * Gets access the GroupBy widget object. + */ + owner?: any; + + /** + * Gets the key of the column to be grouped. + */ + key?: string; + + /** + * Get a reference to the current layout object, if any. + */ + layout?: any; + + /** + * Gets whether column should be sorted ascending or descending. + */ + isAsc?: boolean; } interface IgGridGroupBy { @@ -46989,6 +48055,20 @@ interface ColumnHidingEvent { } interface ColumnHidingEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: number; + + /** + * Gets the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: string; } interface ColumnHidingRefusedEvent { @@ -46996,6 +48076,15 @@ interface ColumnHidingRefusedEvent { } interface ColumnHidingRefusedEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Array of column keys. Has a value only if the column's key is a string. + */ + columnKeys?: any[]; } interface ColumnShowingRefusedEvent { @@ -47003,6 +48092,15 @@ interface ColumnShowingRefusedEvent { } interface ColumnShowingRefusedEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Array of column keys. Has a value only if the column's key is a string. + */ + columnKeys?: any[]; } interface MultiColumnHidingEvent { @@ -47010,6 +48108,15 @@ interface MultiColumnHidingEvent { } interface MultiColumnHidingEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets the array of the hidden column keys. Only when you click on Reset button in column chooser there is an array of column keys. + */ + columnKeys?: any[]; } interface ColumnHiddenEvent { @@ -47017,6 +48124,20 @@ interface ColumnHiddenEvent { } interface ColumnHiddenEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: number; + + /** + * Gets the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: string; } interface ColumnShowingEvent { @@ -47024,6 +48145,20 @@ interface ColumnShowingEvent { } interface ColumnShowingEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets the shown column index. + */ + columnIndex?: number; + + /** + * Gets the shown column key. + */ + columnKey?: string; } interface ColumnShownEvent { @@ -47031,6 +48166,20 @@ interface ColumnShownEvent { } interface ColumnShownEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets the shown column index. + */ + columnIndex?: number; + + /** + * Gets the shown column key. + */ + columnKey?: string; } interface ColumnChooserOpeningEvent { @@ -47038,6 +48187,15 @@ interface ColumnChooserOpeningEvent { } interface ColumnChooserOpeningEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface ColumnChooserOpenedEvent { @@ -47045,6 +48203,15 @@ interface ColumnChooserOpenedEvent { } interface ColumnChooserOpenedEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface ColumnChooserMovingEvent { @@ -47052,6 +48219,25 @@ interface ColumnChooserMovingEvent { } interface ColumnChooserMovingEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; + + /** + * Gets the original position of the column chooser div as { top, left } object, relative to the page. + */ + originalPosition?: any; + + /** + * Gets the current position of the column chooser div as { top, left } object, relative to the page. + */ + position?: any; } interface ColumnChooserClosingEvent { @@ -47059,6 +48245,15 @@ interface ColumnChooserClosingEvent { } interface ColumnChooserClosingEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface ColumnChooserClosedEvent { @@ -47066,6 +48261,15 @@ interface ColumnChooserClosedEvent { } interface ColumnChooserClosedEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface ColumnChooserContentsRenderingEvent { @@ -47073,6 +48277,15 @@ interface ColumnChooserContentsRenderingEvent { } interface ColumnChooserContentsRenderingEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface ColumnChooserContentsRenderedEvent { @@ -47080,6 +48293,15 @@ interface ColumnChooserContentsRenderedEvent { } interface ColumnChooserContentsRenderedEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface ColumnChooserButtonApplyClickEvent { @@ -47087,6 +48309,25 @@ interface ColumnChooserButtonApplyClickEvent { } interface ColumnChooserButtonApplyClickEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; + + /** + * Gets the array of columns identifiers which should be shown. + */ + columnsToShow?: any[]; + + /** + * Gets the array of columns identifiers which should be hidden. + */ + columnsToHide?: any[]; } interface ColumnChooserButtonResetClickEvent { @@ -47094,6 +48335,15 @@ interface ColumnChooserButtonResetClickEvent { } interface ColumnChooserButtonResetClickEventUIParam { + /** + * Gets a reference to the GridHiding widget. + */ + owner?: any; + + /** + * Gets a reference to the Column Chooser element. This is a jQuery object. + */ + columnChooserElement?: string; } interface IgGridHiding { @@ -48944,7 +50194,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 @@ -48953,7 +50203,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 @@ -48969,7 +50219,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 @@ -50326,6 +51576,20 @@ interface GroupCollapsingEvent { } interface GroupCollapsingEventUIParam { + /** + * Gets the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Gets the column object for the current group that is collapsing. + */ + column?: any; + + /** + * Get a reference to the jQuery object for the column being collapsing (th). + */ + element?: string; } interface GroupCollapsedEvent { @@ -50333,6 +51597,20 @@ interface GroupCollapsedEvent { } interface GroupCollapsedEventUIParam { + /** + * Gets the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Gets the column object for the current group that is collapsed. + */ + column?: any; + + /** + * Get a reference to the jQuery object for the column being collapsed (th). + */ + element?: string; } interface GroupExpandingEvent { @@ -50340,6 +51618,20 @@ interface GroupExpandingEvent { } interface GroupExpandingEventUIParam { + /** + * Gets the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Gets the column object for the current group that is expanding. + */ + column?: any; + + /** + * Gets a reference to the jQuery object for the column being expanded (th). + */ + element?: string; } interface GroupExpandedEvent { @@ -50347,6 +51639,15 @@ interface GroupExpandedEvent { } interface GroupExpandedEventUIParam { + /** + * Gets the reference to the GridMultiColumnHeaders widget. + */ + owner?: any; + + /** + * Gets a reference to the jQuery object for the column being expanded (th). + */ + element?: string; } interface IgGridMultiColumnHeaders { @@ -50499,6 +51800,20 @@ interface PageIndexChangingEvent { } interface PageIndexChangingEventUIParam { + /** + * Gets reference to GridPaging. + */ + owner?: any; + + /** + * Gets current page index. + */ + currentPageIndex?: number; + + /** + * Gets new page index. + */ + newPageIndex?: number; } interface PageIndexChangedEvent { @@ -50506,6 +51821,15 @@ interface PageIndexChangedEvent { } interface PageIndexChangedEventUIParam { + /** + * Gets reference to GridPaging. + */ + owner?: any; + + /** + * Gets the current page index. + */ + pageIndex?: number; } interface PageSizeChangingEvent { @@ -50514,9 +51838,14 @@ interface PageSizeChangingEvent { interface PageSizeChangingEventUIParam { /** - * Used to get new page size. + * Gets reference to GridPaging. */ - newPageSize?: any; + owner?: any; + + /** + * Gets the current page size. + */ + currentPageSize?: number; } interface PageSizeChangedEvent { @@ -50524,6 +51853,15 @@ interface PageSizeChangedEvent { } interface PageSizeChangedEventUIParam { + /** + * Gets reference to GridPaging. + */ + owner?: any; + + /** + * Gets the current page size. + */ + currentPageSize?: number; } interface PagerRenderingEvent { @@ -50531,6 +51869,15 @@ interface PagerRenderingEvent { } interface PagerRenderingEventUIParam { + /** + * Gets reference to GridPaging. + */ + owner?: any; + + /** + * Gets a reference to grid's data source. + */ + dataSource?: any; } interface PagerRenderedEvent { @@ -50538,6 +51885,15 @@ interface PagerRenderedEvent { } interface PagerRenderedEventUIParam { + /** + * Gets reference to GridPaging. + */ + owner?: any; + + /** + * Gets a reference to grid's data source. + */ + dataSource?: any; } interface IgGridPaging { @@ -51444,6 +52800,25 @@ interface ColumnResizingEvent { } interface ColumnResizingEventUIParam { + /** + * Gets a reference to the GridResizing widget. + */ + owner?: any; + + /** + * Gets the resized column index. + */ + columnIndex?: number; + + /** + * Gets the resized column key. + */ + columnKey?: string; + + /** + * Gets the desired width(before min/max coercion) for the resized column. + */ + desiredWidth?: number; } interface ColumnResizingRefusedEvent { @@ -51451,6 +52826,25 @@ interface ColumnResizingRefusedEvent { } interface ColumnResizingRefusedEventUIParam { + /** + * Gets a reference to the GridResizing widget. + */ + owner?: any; + + /** + * Gets the resized column index. + */ + columnIndex?: number; + + /** + * Gets the resized column key. + */ + columnKey?: string; + + /** + * Gets the desired width(before min/max coercion) for the resized column. + */ + desiredWidth?: number; } interface ColumnResizedEvent { @@ -51458,6 +52852,30 @@ interface ColumnResizedEvent { } interface ColumnResizedEventUIParam { + /** + * Gets a reference to the GridResizing widget. + */ + owner?: any; + + /** + * Gets the resized column index. + */ + columnIndex?: number; + + /** + * Gets the resized column key. + */ + columnKey?: string; + + /** + * Gets the original column width. + */ + originalWidth?: number; + + /** + * Gets the final column width after resizing. + */ + newWidth?: number; } interface IgGridResizing { @@ -51714,6 +53132,20 @@ interface ResponsiveColumnHidingEvent { } interface ResponsiveColumnHidingEventUIParam { + /** + * Gets the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Gets the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: number; + + /** + * Gets the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: string; } interface ResponsiveColumnHiddenEvent { @@ -51721,6 +53153,20 @@ interface ResponsiveColumnHiddenEvent { } interface ResponsiveColumnHiddenEventUIParam { + /** + * Gets the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Gets the hidden column index. Has a value only if the column's key is a number. + */ + columnIndex?: number; + + /** + * Gets the hidden column key. Has a value only if the column's key is a string. + */ + columnKey?: string; } interface ResponsiveColumnShowingEvent { @@ -51728,6 +53174,20 @@ interface ResponsiveColumnShowingEvent { } interface ResponsiveColumnShowingEventUIParam { + /** + * Gets the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Gets the shown column index. Has a value only if the column's key is a number. + */ + columnIndex?: number; + + /** + * Gets the shown column key. Has a value only if the column's key is a string. + */ + columnKey?: string; } interface ResponsiveColumnShownEvent { @@ -51735,6 +53195,20 @@ interface ResponsiveColumnShownEvent { } interface ResponsiveColumnShownEventUIParam { + /** + * Gets the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Gets the shown column index. Has a value only if the column's key is a number. + */ + columnIndex?: number; + + /** + * Gets the shown column key. Has a value only if the column's key is a string. + */ + columnKey?: string; } interface ResponsiveModeChangedEvent { @@ -51742,6 +53216,20 @@ interface ResponsiveModeChangedEvent { } interface ResponsiveModeChangedEventUIParam { + /** + * Gets the reference to the igGridResponsive widget. + */ + owner?: any; + + /** + * Gets the previously assumed mode. + */ + previousMode?: string; + + /** + * Gets the newly assumed mode. + */ + mode?: string; } interface IgGridResponsive { @@ -52179,6 +53667,40 @@ interface RowSelectorClickedEvent { } interface RowSelectorClickedEventUIParam { + /** + * Gets reference to the row the clicked row selector resides in. + */ + row?: string; + + /** + * Gets reference to the fixed row the clicked row selector resides in(if there are fixed columns). + */ + fixedRow?: string; + + /** + * Gets the index of the row the clicked row selector resides in. + */ + rowIndex?: number; + + /** + * Gets the key of the row the clicked row selector resides in. + */ + rowKey?: string; + + /** + * Gets a reference to the row selector cell. + */ + rowSelector?: string; + + /** + * Gets reference to RowSelectors. + */ + owner?: any; + + /** + * Gets a reference to the grid the RowSelectors are initialized for. + */ + grid?: any; } interface CheckBoxStateChangingEvent { @@ -52186,6 +53708,50 @@ interface CheckBoxStateChangingEvent { } interface CheckBoxStateChangingEventUIParam { + /** + * Gets a reference to the row the clicked row selector resides in. + */ + row?: string; + + /** + * Gets the index of the row the clicked row selector resides in. + */ + rowIndex?: number; + + /** + * Gets the key of the row the clicked row selector resides in. + */ + rowKey?: any; + + /** + * Gets a reference to the row selector cell. + */ + rowSelector?: string; + + /** + * Gets a reference to the igGridRowSelectors. + */ + owner?: any; + + /** + * Gets a reference to the grid the RowSelectors are initialized for. + */ + grid?: any; + + /** + * Gets the current state of the checkbox ("on","off"). + */ + currentState?: string; + + /** + * Gets the new state of the checkbox ("on","off"). + */ + newState?: string; + + /** + * Checks if the header check box is the one being clicked. In this case no row related args are passed. + */ + isHeader?: boolean; } interface CheckBoxStateChangedEvent { @@ -52193,6 +53759,45 @@ interface CheckBoxStateChangedEvent { } interface CheckBoxStateChangedEventUIParam { + /** + * Gets a reference to the row the clicked row selector resides in. + */ + row?: string; + + /** + * Gets the index of the row the clicked row selector resides in. + */ + rowIndex?: number; + + /** + * Gets the key of the row the clicked row selector resides in. + */ + rowKey?: string; + + /** + * Gets reference to the row selector cell. + */ + rowSelector?: string; + + /** + * Gets reference to the igGridRowSelectors. + */ + owner?: any; + + /** + * Gets reference to the grid the RowSelectors are initialized for. + */ + grid?: any; + + /** + * Gets the state of the checkbox ("on","off"). + */ + state?: string; + + /** + * Checks if the header check box is the one being clicked. In this case no row related args are passed. + */ + isHeader?: boolean; } interface IgGridRowSelectors { @@ -52504,6 +54109,30 @@ interface RowSelectionChangingEvent { } interface RowSelectionChangingEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets reference to the row object. + */ + row?: any; + + /** + * Gets reference to rows object array. + */ + selectedRows?: any[]; + + /** + * Gets the start index for a range row selection. + */ + startIndex?: number; + + /** + * Gets the end index for a range row selection. + */ + endIndex?: number; } interface RowSelectionChangedEvent { @@ -52511,6 +54140,20 @@ interface RowSelectionChangedEvent { } interface RowSelectionChangedEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets reference to the row object. + */ + row?: any; + + /** + * Gets reference to rows object array. + */ + selectedRows?: any[]; } interface CellSelectionChangingEvent { @@ -52518,6 +54161,40 @@ interface CellSelectionChangingEvent { } interface CellSelectionChangingEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets reference to the cell object. + */ + cell?: any; + + /** + * Gets reference to selected cells object array. + */ + selectedCells?: any[]; + + /** + * Gets the column index for the first cell in a range selection. + */ + firstColumnIndex?: number; + + /** + * Gets the row index for the first cell in a range selection. + */ + firstRowIndex?: number; + + /** + * Gets the column index for the last cell in a range selection. + */ + lastColumnIndex?: number; + + /** + * Gets the row index for the last cell in a range selection. + */ + lastRowIndex?: number; } interface CellSelectionChangedEvent { @@ -52525,6 +54202,20 @@ interface CellSelectionChangedEvent { } interface CellSelectionChangedEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets reference to the cell object. + */ + cell?: any; + + /** + * Gets reference to selected cells object array. + */ + selectedCells?: any[]; } interface ActiveCellChangingEvent { @@ -52532,6 +54223,15 @@ interface ActiveCellChangingEvent { } interface ActiveCellChangingEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets reference to the cell object. + */ + cell?: any; } interface ActiveCellChangedEvent { @@ -52539,6 +54239,15 @@ interface ActiveCellChangedEvent { } interface ActiveCellChangedEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets reference to the cell object. + */ + cell?: any; } interface ActiveRowChangingEvent { @@ -52546,6 +54255,15 @@ interface ActiveRowChangingEvent { } interface ActiveRowChangingEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets a reference to the row object. + */ + row?: any; } interface ActiveRowChangedEvent { @@ -52553,6 +54271,15 @@ interface ActiveRowChangedEvent { } interface ActiveRowChangedEventUIParam { + /** + * Gets reference to GridSelection. + */ + owner?: any; + + /** + * Gets a reference to the row object. + */ + row?: any; } interface IgGridSelection { @@ -52745,28 +54472,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; @@ -53230,6 +54957,25 @@ interface ColumnSortingEvent { } interface ColumnSortingEventUIParam { + /** + * Gets a reference to GridSorting. + */ + owner?: any; + + /** + * Gets the column key. + */ + columnKey?: string; + + /** + * Gets the sorting direction. + */ + direction?: string; + + /** + * Gets sorting expressions. + */ + newExpressions?: any[]; } interface ColumnSortedEvent { @@ -53237,6 +54983,25 @@ interface ColumnSortedEvent { } interface ColumnSortedEventUIParam { + /** + * Gets a reference to GridSorting. + */ + owner?: any; + + /** + * Gets the column key. + */ + columnKey?: string; + + /** + * Gets the sorting direction. + */ + direction?: string; + + /** + * Gets the sorted expressions. + */ + expressions?: any; } interface ModalDialogSortingChangedEvent { @@ -53244,6 +55009,25 @@ interface ModalDialogSortingChangedEvent { } interface ModalDialogSortingChangedEventUIParam { + /** + * Gets a reference to GridSorting. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; + + /** + * Gets the column key. + */ + columnKey?: string; + + /** + * Gets whether column should be ascending or not. If true it should be ascending + */ + isAsc?: boolean; } interface ModalDialogButtonUnsortClickEvent { @@ -53251,6 +55035,20 @@ interface ModalDialogButtonUnsortClickEvent { } interface ModalDialogButtonUnsortClickEventUIParam { + /** + * Gets a reference to GridSorting. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; + + /** + * Gets the column key. + */ + columnKey?: string; } interface ModalDialogSortClickEvent { @@ -53258,6 +55056,20 @@ interface ModalDialogSortClickEvent { } interface ModalDialogSortClickEventUIParam { + /** + * Gets a reference to GridSorting. + */ + owner?: any; + + /** + * Gets a reference to the modal dialog element. This is a jQuery object. + */ + modalDialogElement?: string; + + /** + * Gets the column key. + */ + columnKey?: string; } interface IgGridSorting { @@ -54315,6 +56127,10 @@ interface SummariesCalculatingEvent { } interface SummariesCalculatingEventUIParam { + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface SummariesCalculatedEvent { @@ -54322,6 +56138,15 @@ interface SummariesCalculatedEvent { } interface SummariesCalculatedEventUIParam { + /** + * Gets the data for calculated summaries. + */ + data?: any[]; + + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface SummariesMethodSelectionChangedEvent { @@ -54329,6 +56154,25 @@ interface SummariesMethodSelectionChangedEvent { } interface SummariesMethodSelectionChangedEventUIParam { + /** + * Gets the column key of the column where it is changed selection of summary method. + */ + columnKey?: string; + + /** + * Gets whether method is selected or not. + */ + isSelected?: boolean; + + /** + * Gets the summary method name. + */ + methodName?: string; + + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface SummariesTogglingEvent { @@ -54336,6 +56180,15 @@ interface SummariesTogglingEvent { } interface SummariesTogglingEventUIParam { + /** + * Gets whether summaries are shown or not. + */ + isToShow?: boolean; + + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface SummariesToggledEvent { @@ -54343,6 +56196,15 @@ interface SummariesToggledEvent { } interface SummariesToggledEventUIParam { + /** + * Gets whether summaries are shown or not. + */ + isToShow?: boolean; + + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface DropDownOKClickedEvent { @@ -54350,6 +56212,20 @@ interface DropDownOKClickedEvent { } interface DropDownOKClickedEventUIParam { + /** + * Gets the column key for which OK button is clicked. + */ + columnKey?: string; + + /** + * Gets data for summary methods. Format of event data is {type: "min", active: false}; + */ + eventData?: any; + + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface DropDownCancelClickedEvent { @@ -54357,6 +56233,15 @@ interface DropDownCancelClickedEvent { } interface DropDownCancelClickedEventUIParam { + /** + * Gets the column key for which Cancel button is clicked. + */ + columnKey?: string; + + /** + * Gets the igGridSummaries widget object. + */ + owner?: any; } interface IgGridSummaries { @@ -55652,6 +57537,15 @@ interface EditRowStartingEvent { } interface EditRowStartingEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Checks if the edit mode is for adding a new row. + */ + rowAdding?: boolean; } interface EditRowStartedEvent { @@ -55659,6 +57553,15 @@ interface EditRowStartedEvent { } interface EditRowStartedEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Checks if the edit mode is for adding a new row. + */ + rowAdding?: boolean; } interface EditRowEndingEvent { @@ -55666,6 +57569,25 @@ interface EditRowEndingEvent { } interface EditRowEndingEventUIParam { + /** + * 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?: boolean; + + /** + * Checks if the edit mode is for adding a new row. + */ + rowAdding?: boolean; + + /** + * Gets or set the new value for the column with the specified key. + */ + values?: any; + + /** + * Gets the old value for the column with the specified key. + */ + oldValues?: any; } interface EditRowEndedEvent { @@ -55673,6 +57595,30 @@ interface EditRowEndedEvent { } interface EditRowEndedEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Check if any of the values is changed which will cause update in the data source. + */ + update?: boolean; + + /** + * Check if the edit mode is for adding a new row. + */ + rowAdding?: boolean; + + /** + * Gets the new value for the column with the specified key. + */ + values?: any; + + /** + * Gets the old value for the column with the specified key. + */ + oldValues?: any; } interface EditCellStartingEvent { @@ -55680,6 +57626,35 @@ interface EditCellStartingEvent { } interface EditCellStartingEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Gets the index of the column. + */ + columnIndex?: number; + + /** + * Gets the key of the column. + */ + columnKey?: string; + + /** + * Gets a reference to the editor used for editing the column. + */ + editor?: string; + + /** + * Gets or set the value of the editor. + */ + value?: any; + + /** + * Checks if the edit mode is for adding a new row. + */ + rowAdding?: boolean; } interface EditCellStartedEvent { @@ -55687,6 +57662,35 @@ interface EditCellStartedEvent { } interface EditCellStartedEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Gets the index of the column. + */ + columnIndex?: number; + + /** + * Gets the key of the column. + */ + columnKey?: string; + + /** + * Gets a reference to the editor used for editing the column. + */ + editor?: string; + + /** + * Gets or set the value of the editor. + */ + value?: any; + + /** + * Checks if the edit mode is for adding a new row. + */ + rowAdding?: boolean; } interface EditCellEndingEvent { @@ -55694,6 +57698,45 @@ interface EditCellEndingEvent { } interface EditCellEndingEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Gets the index of the column. + */ + columnIndex?: number; + + /** + * Gets the key of the column. + */ + columnKey?: string; + + /** + * Gets a reference to the editor used for editing the column. + */ + editor?: string; + + /** + * Gets or set the value of the editor. + */ + value?: any; + + /** + * Gets the old value. + */ + oldValue?: any; + + /** + * 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?: boolean; + + /** + * Check if the edit mode is for adding a new row. + */ + rowAdding?: boolean; } interface EditCellEndedEvent { @@ -55701,6 +57744,45 @@ interface EditCellEndedEvent { } interface EditCellEndedEventUIParam { + /** + * Gets the row's PK value. + */ + rowID?: any; + + /** + * Gets the index of the column. + */ + columnIndex?: number; + + /** + * Gets the key of the column. + */ + columnKey?: string; + + /** + * Gets a reference to the editor used for editing the column. + */ + editor?: string; + + /** + * Gets the new value. + */ + value?: any; + + /** + * Gets the old value. + */ + oldValue?: any; + + /** + * 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?: boolean; + + /** + * Check if the edit mode is for adding a new row. + */ + rowAdding?: boolean; } interface RowAddingEvent { @@ -55708,6 +57790,15 @@ interface RowAddingEvent { } interface RowAddingEventUIParam { + /** + * Gets the value for the column with the specified key. + */ + values?: any; + + /** + * Gets the default value (before editing) for the column with the specified key. + */ + oldValues?: any; } interface RowAddedEvent { @@ -55715,6 +57806,15 @@ interface RowAddedEvent { } interface RowAddedEventUIParam { + /** + * Gets the value for the column with the specified key. + */ + values?: any; + + /** + * Gets the default value (before editing) for the column with the specified key. + */ + oldValues?: any; } interface RowDeletingEvent { @@ -55722,6 +57822,15 @@ interface RowDeletingEvent { } interface RowDeletingEventUIParam { + /** + * Gets a jQuery object containing the TR element of the row to delete. + */ + element?: string; + + /** + * Gets the row's PK value. + */ + rowID?: any; } interface RowDeletedEvent { @@ -55729,6 +57838,15 @@ interface RowDeletedEvent { } interface RowDeletedEventUIParam { + /** + * Gets a jQuery object containing the TR element of the deleted row. + */ + element?: string; + + /** + * Gets the row's PK value. + */ + rowID?: any; } interface DataDirtyEvent { @@ -55743,6 +57861,10 @@ interface GeneratePrimaryKeyValueEvent { } interface GeneratePrimaryKeyValueEventUIParam { + /** + * Gets 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 { @@ -55750,6 +57872,10 @@ interface RowEditDialogBeforeOpenEvent { } interface RowEditDialogBeforeOpenEventUIParam { + /** + * Gets a reference to row edit dialog DOM element. + */ + dialogElement?: string; } interface RowEditDialogAfterOpenEvent { @@ -55757,6 +57883,10 @@ interface RowEditDialogAfterOpenEvent { } interface RowEditDialogAfterOpenEventUIParam { + /** + * Gets a reference to row edit dialog DOM element. + */ + dialogElement?: string; } interface RowEditDialogBeforeCloseEvent { @@ -55764,6 +57894,10 @@ interface RowEditDialogBeforeCloseEvent { } interface RowEditDialogBeforeCloseEventUIParam { + /** + * Gets a reference to row edit dialog DOM element. + */ + dialogElement?: string; } interface RowEditDialogAfterCloseEvent { @@ -55771,6 +57905,10 @@ interface RowEditDialogAfterCloseEvent { } interface RowEditDialogAfterCloseEventUIParam { + /** + * Gets a reference to row edit dialog DOM element. + */ + dialogElement?: string; } interface RowEditDialogContentsRenderedEvent { @@ -55778,6 +57916,10 @@ interface RowEditDialogContentsRenderedEvent { } interface RowEditDialogContentsRenderedEventUIParam { + /** + * Gets a reference to row edit dialog DOM element. + */ + dialogElement?: string; } interface IgGridUpdating { @@ -57896,7 +60038,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; @@ -57928,7 +60070,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; @@ -57947,7 +60089,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; @@ -58059,23 +60201,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: @@ -58095,40 +60237,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; @@ -58140,7 +60282,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. @@ -58150,9 +60292,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; } @@ -58222,24 +60364,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. @@ -58248,22 +60390,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. @@ -58286,13 +60428,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. */ @@ -58300,7 +60442,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; @@ -60894,7 +63036,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. @@ -60903,7 +63045,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. @@ -62253,8 +64395,9 @@ 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 priority specified by the [directionPriority](ui.igpopover#options:directionPriority) property + * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.%%WidgetNameLowered%%#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 @@ -62264,13 +64407,15 @@ interface IgNotifier { /** * 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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#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 * + * * Valid values: * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start * "balanced" the popover is positioned at the middle of the target element @@ -62281,31 +64426,37 @@ interface IgNotifier { /** * defines width for the popover. leave null for auto. + * */ width?: number|string; /** * defines height for the popover. leave null for auto + * */ height?: number|string; /** * defines width the popover won't go under the value even if no specific one is set. + * */ minWidth?: number|string; /** * defines width the popover won't exceed even if no specific one is set. + * */ maxWidth?: number|string; /** * defines height the popover won't exceed even if no specific one is set. + * */ maxHeight?: number|string; /** * Sets the containment for the popover. Accepts a jQuery object + * */ containment?: any; @@ -62621,25 +64772,29 @@ interface JQuery { /** * Controls the direction in which the control shows relative to the target element + * */ igNotifier(optionLiteral: 'option', optionName: "direction"): string; /** * Controls the direction in which the control shows relative to the target element * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "direction", optionValue: string): void; /** * Controls the 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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * * * @optionValue New value to be set. */ @@ -62647,84 +64802,98 @@ interface JQuery { /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * */ igNotifier(optionLiteral: 'option', optionName: "position"): string; /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "position", optionValue: string): void; /** * Defines width for the popover. leave null for auto. + * */ igNotifier(optionLiteral: 'option', optionName: "width"): number|string; /** * Defines width for the popover. leave null for auto. * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; /** * Defines height for the popover. leave null for auto + * */ igNotifier(optionLiteral: 'option', optionName: "height"): number|string; /** * Defines height for the popover. leave null for auto * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; /** * Defines width the popover won't go under the value even if no specific one is set. + * */ igNotifier(optionLiteral: 'option', optionName: "minWidth"): number|string; /** * Defines width the popover won't go under the value even if no specific one is set. * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "minWidth", optionValue: number|string): void; /** * Defines width the popover won't exceed even if no specific one is set. + * */ igNotifier(optionLiteral: 'option', optionName: "maxWidth"): number|string; /** * Defines width the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "maxWidth", optionValue: number|string): void; /** * Defines height the popover won't exceed even if no specific one is set. + * */ igNotifier(optionLiteral: 'option', optionName: "maxHeight"): number|string; /** * Defines height the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "maxHeight", optionValue: number|string): void; /** * The containment for the popover. Accepts a jQuery object + * */ igNotifier(optionLiteral: 'option', optionName: "containment"): any; /** * Sets the containment for the popover. Accepts a jQuery object * + * * @optionValue New value to be set. */ igNotifier(optionLiteral: 'option', optionName: "containment", optionValue: any): void; @@ -67108,9 +69277,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; } @@ -67222,14 +69391,16 @@ interface JQuery { interface IgPopover { /** * Controls whether the popover will close on blur or not + * */ closeOnBlur?: boolean; /** * controls the direction in which the control shows relative to the target element * + * * Valid values: - * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.igpopover#options:directionPriority) property + * "auto" lets the control show on the side where enough space is available with the priority specified by the [directionPriority](ui.%%WidgetNameLowered%%#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 @@ -67239,13 +69410,15 @@ interface IgPopover { /** * 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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#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 * + * * Valid values: * "auto" lets the control choose a position depending on available space with the following priority balanced > end > start * "balanced" the popover is positioned at the middle of the target element @@ -67256,37 +69429,44 @@ interface IgPopover { /** * defines width for the popover. leave null for auto. + * */ width?: number|string; /** * defines height for the popover. leave null for auto + * */ height?: number|string; /** * defines width the popover won't go under the value even if no specific one is set. + * */ minWidth?: number|string; /** * defines width the popover won't exceed even if no specific one is set. + * */ maxWidth?: number|string; /** * defines height the popover won't exceed even if no specific one is set. + * */ maxHeight?: number|string; /** * Sets the time popover fades in and out when showing/hiding + * */ animationDuration?: number; /** * sets the content for the popover container. If left null the content will be get from the target. * + * * Valid values: * "string" String content of the popover container * "function" Function which is a callback that should return the content. Use the 'this' value to access the target DOM element. @@ -67295,17 +69475,20 @@ interface IgPopover { /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ selectors?: string; /** * Sets the content for the popover header + * */ headerTemplate?: IgPopoverHeaderTemplate; /** * sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * Valid values: * "mouseenter" the popover is shown on mouse enter in the target element * "click" the popover is shown on click on the target element @@ -67315,6 +69498,7 @@ interface IgPopover { /** * Sets the containment for the popover. Accepts a jQuery object + * */ containment?: any; @@ -67429,37 +69613,43 @@ interface JQuery { /** * Controls whether the popover will close on blur or not + * */ igPopover(optionLiteral: 'option', optionName: "closeOnBlur"): boolean; /** * Controls whether the popover will close on blur or not * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "closeOnBlur", optionValue: boolean): void; /** * Controls the direction in which the control shows relative to the target element + * */ igPopover(optionLiteral: 'option', optionName: "direction"): string; /** * Controls the direction in which the control shows relative to the target element * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "direction", optionValue: string): void; /** * Controls the 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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#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. + * This property has effect only if the [direction](ui.%%WidgetNameLowered%%#options:direction) property value is "auto" or unset. + * * * @optionValue New value to be set. */ @@ -67467,144 +69657,168 @@ interface JQuery { /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area + * */ igPopover(optionLiteral: 'option', optionName: "position"): string; /** * Controls the position of the popover according to the target element in case the popover is larger than the target on the side we want to position, if the popover is smaller it should always be in the middle of the visible area * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "position", optionValue: string): void; /** * Defines width for the popover. leave null for auto. + * */ igPopover(optionLiteral: 'option', optionName: "width"): number|string; /** * Defines width for the popover. leave null for auto. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "width", optionValue: number|string): void; /** * Defines height for the popover. leave null for auto + * */ igPopover(optionLiteral: 'option', optionName: "height"): number|string; /** * Defines height for the popover. leave null for auto * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "height", optionValue: number|string): void; /** * Defines width the popover won't go under the value even if no specific one is set. + * */ igPopover(optionLiteral: 'option', optionName: "minWidth"): number|string; /** * Defines width the popover won't go under the value even if no specific one is set. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "minWidth", optionValue: number|string): void; /** * Defines width the popover won't exceed even if no specific one is set. + * */ igPopover(optionLiteral: 'option', optionName: "maxWidth"): number|string; /** * Defines width the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "maxWidth", optionValue: number|string): void; /** * Defines height the popover won't exceed even if no specific one is set. + * */ igPopover(optionLiteral: 'option', optionName: "maxHeight"): number|string; /** * Defines height the popover won't exceed even if no specific one is set. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "maxHeight", optionValue: number|string): void; /** * The time popover fades in and out when showing/hiding + * */ igPopover(optionLiteral: 'option', optionName: "animationDuration"): number; /** * Sets the time popover fades in and out when showing/hiding * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "animationDuration", optionValue: number): void; /** * The content for the popover container. If left null the content will be get from the target. + * */ igPopover(optionLiteral: 'option', optionName: "contentTemplate"): string|Function; /** * Sets the content for the popover container. If left null the content will be get from the target. * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "contentTemplate", optionValue: string|Function): void; /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option + * */ igPopover(optionLiteral: 'option', optionName: "selectors"): string; /** * Selectors indicating which items should show popovers. The predefined value is [title]. Customize if you're using something other then the title attribute for the popover content, or if you need a different selector for event delegation. When changing this option, you likely need to also change the contentTemplate option * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "selectors", optionValue: string): void; /** * The content for the popover header + * */ igPopover(optionLiteral: 'option', optionName: "headerTemplate"): IgPopoverHeaderTemplate; /** * Sets the content for the popover header * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "headerTemplate", optionValue: IgPopoverHeaderTemplate): void; /** * The event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" + * */ igPopover(optionLiteral: 'option', optionName: "showOn"): string; /** * Sets the event on which the popover will be shown. Predefined values are "mouseenter", "click" and "focus" * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "showOn", optionValue: string): void; /** * The containment for the popover. Accepts a jQuery object + * */ igPopover(optionLiteral: 'option', optionName: "containment"): any; /** * Sets the containment for the popover. Accepts a jQuery object * + * * @optionValue New value to be set. */ igPopover(optionLiteral: 'option', optionName: "containment", optionValue: any): void; @@ -70736,6 +72950,25 @@ interface AgendaRangeChangingEvent { } interface AgendaRangeChangingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the days to be shown in AgendaView mode. + */ + dateRangeInterval?: number; + + /** + * Gets a reference to the current AgendaView start date. + */ + currentAgendaRangeStartDate?: any; + + /** + * Gets a reference to the newly AgendaView start date. + */ + newAgendaRangeStartDate?: any; } interface AgendaRangeChangedEvent { @@ -70743,6 +72976,20 @@ interface AgendaRangeChangedEvent { } interface AgendaRangeChangedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the days to be shown in AgendaView mode. + */ + dateRangeInterval?: number; + + /** + * Gets a reference to the newly AgendaView start date. + */ + newAgendaRangeStartDate?: any; } interface DaySelectedEvent { @@ -70750,6 +72997,15 @@ interface DaySelectedEvent { } interface DaySelectedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to currently selected date. + */ + date?: any; } interface MonthChangingEvent { @@ -70757,6 +73013,20 @@ interface MonthChangingEvent { } interface MonthChangingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to newly selected date. + */ + newSelectedDate?: any; + + /** + * Gets a reference to the currently selected date. + */ + currentSelectedDate?: any; } interface MonthChangedEvent { @@ -70764,6 +73034,15 @@ interface MonthChangedEvent { } interface MonthChangedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to newly selected date. + */ + newSelectedDate?: any; } interface ViewChangingEvent { @@ -70771,6 +73050,20 @@ interface ViewChangingEvent { } interface ViewChangingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the currently selected view. + */ + currentSelectedView?: string; + + /** + * Gets a reference to the newly selected view. + */ + newSelectedView?: string; } interface ViewChangedEvent { @@ -70778,6 +73071,15 @@ interface ViewChangedEvent { } interface ViewChangedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the newly selected view. + */ + newSelectedView?: string; } interface AppointmentDialogOpeningEvent { @@ -70785,6 +73087,20 @@ interface AppointmentDialogOpeningEvent { } interface AppointmentDialogOpeningEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the appointment dialog. + */ + element?: any; + + /** + * Gets whether we are creating or updating an appointment. + */ + isAppointmentNew?: boolean; } interface AppointmentDialogOpenedEvent { @@ -70792,6 +73108,20 @@ interface AppointmentDialogOpenedEvent { } interface AppointmentDialogOpenedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the appointment dialog. + */ + element?: any; + + /** + * Gets whether we are creating or updating an appointment. + */ + isAppointmentNew?: boolean; } interface AppointmentDialogClosingEvent { @@ -70799,6 +73129,20 @@ interface AppointmentDialogClosingEvent { } interface AppointmentDialogClosingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the appointment dialog. + */ + element?: any; + + /** + * Gets whether we are creating or updating an appointment. + */ + isAppointmentNew?: boolean; } interface AppointmentDialogClosedEvent { @@ -70806,6 +73150,20 @@ interface AppointmentDialogClosedEvent { } interface AppointmentDialogClosedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the appointment dialog. + */ + element?: any; + + /** + * Gets whether we are creating or updating an appointment. + */ + isAppointmentNew?: boolean; } interface AppointmentCreatingEvent { @@ -70813,6 +73171,15 @@ interface AppointmentCreatingEvent { } interface AppointmentCreatingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the appointment which is going to be created. + */ + appointment?: any; } interface AppointmentCreatedEvent { @@ -70820,6 +73187,15 @@ interface AppointmentCreatedEvent { } interface AppointmentCreatedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the created appointment. + */ + appointment?: any; } interface AppointmentDeletingEvent { @@ -70827,6 +73203,15 @@ interface AppointmentDeletingEvent { } interface AppointmentDeletingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the appointment which is going to be deleted. + */ + appointment?: any; } interface AppointmentDeletedEvent { @@ -70834,6 +73219,15 @@ interface AppointmentDeletedEvent { } interface AppointmentDeletedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets the id of the deleted appointment. + */ + appointmentId?: any; } interface AppointmentEditingEvent { @@ -70841,6 +73235,20 @@ interface AppointmentEditingEvent { } interface AppointmentEditingEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the original appointment. + */ + appointment?: any; + + /** + * Gets a reference to the appointment with the edited values. + */ + newAppointment?: any; } interface AppointmentEditedEvent { @@ -70848,6 +73256,15 @@ interface AppointmentEditedEvent { } interface AppointmentEditedEventUIParam { + /** + * Gets a reference to the scheduler. + */ + owner?: any; + + /** + * Gets a reference to the edited appointment. + */ + appointment?: any; } interface IgScheduler { @@ -73503,7 +75920,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. */ @@ -73511,7 +75928,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. @@ -73521,7 +75938,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. @@ -75044,6 +77461,30 @@ interface ActivePaneChangedEvent { } interface ActivePaneChangedEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Gets the previous active [pane](ig.spreadsheet.SpreadsheetPane). + */ + oldActivePane?: any; + + /** + * Gets the current active [pane](ig.spreadsheet.SpreadsheetPane). + */ + newActivePane?: any; + + /** + * Gets the active cell of the new active pane or null if there is no active pane. + */ + activeCell?: string; + + /** + * Gets the current visible range of the new active pane or null if there is no active pane. + */ + visibleRange?: string; } interface ActiveWorksheetChangedEvent { @@ -75051,6 +77492,135 @@ interface ActiveWorksheetChangedEvent { } interface ActiveWorksheetChangedEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Gets the previous active [worksheet](ig.excel.Worksheet). + */ + oldActiveWorksheet?: any; + + /** + * Gets the name of the previous active worksheet or null if oldActiveWorksheet is null. + */ + oldActiveWorksheetName?: string; + + /** + * Gets the current active [worksheet](ig.excel.Worksheet). + */ + newActiveWorksheet?: any; + + /** + * Gets the name of the new active worksheet or null if newActiveWorksheet is null. + */ + newActiveWorksheetName?: string; +} + +interface EditModeExitingEvent { + (event: Event, ui: EditModeExitingEventUIParam): void; +} + +interface EditModeExitingEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Get or set a boolean indicating whether the changes will be made to the cell's value when edit mode ends. + */ + acceptChanges?: boolean; + + /** + * Get a boolean indicating if the edit mode is being forced to exit edit mode in which case it cannot be cancelled. + */ + canCancel?: boolean; + + /** + * Gets the cell for which the control is exiting edit mode. + */ + cell?: string; +} + +interface EditModeExitedEvent { + (event: Event, ui: EditModeExitedEventUIParam): void; +} + +interface EditModeExitedEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Gets the cell for which the control has exited edit mode. + */ + cell?: string; +} + +interface EditModeEnteringEvent { + (event: Event, ui: EditModeEnteringEventUIParam): void; +} + +interface EditModeEnteringEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Gets the cell for which the control is going into edit mode. + */ + cell?: string; +} + +interface EditModeEnteredEvent { + (event: Event, ui: EditModeEnteredEventUIParam): void; +} + +interface EditModeEnteredEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Gets the cell for which the control has entered edit mode. + */ + cell?: string; +} + +interface EditModeValidationErrorEvent { + (event: Event, ui: EditModeValidationErrorEventUIParam): void; +} + +interface EditModeValidationErrorEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Get or set the [action](ig.spreadsheet.SpreadsheetEditModeValidationErrorAction) to take in response to the failed validation. + */ + action?: string; + + /** + * Get a boolean indicating whether the cell is allowed to stay in edit mode. + */ + canStayInEditMode?: boolean; + + /** + * Gets the cell for which the control is in edit mode. + */ + cell?: string; + + /** + * Get the [rule](ig.excel.DataValidationRule) which failed validation. + */ + validationRule?: string; } interface EditRangePasswordNeededEvent { @@ -75058,6 +77628,20 @@ interface EditRangePasswordNeededEvent { } interface EditRangePasswordNeededEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Get an array of [protected range](ig.excel.WorksheetProtectedRange) objects that should be unlocked. + */ + ranges?: any[]; + + /** + * Get a parameterless function that may be invoked to unlock the associated ranges. + */ + unprotect?: any; } interface HyperlinkExecutingEvent { @@ -75065,6 +77649,15 @@ interface HyperlinkExecutingEvent { } interface HyperlinkExecutingEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Get the [hyperlink](ig.excel.WorksheetHyperlink) to be executed. + */ + hyperlink?: any; } interface UserPromptDisplayingEvent { @@ -75072,6 +77665,35 @@ interface UserPromptDisplayingEvent { } interface UserPromptDisplayingEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; + + /** + * Get a boolean indicating if the operation that triggered the prompt can be cancelled. + */ + canCancel?: boolean; + + /** + * Get a boolean indicating if a message will be displayed to the end user. + */ + displayMessage?: boolean; + + /** + * Gets the exception for the error, if there was one. + */ + exception?: any; + + /** + * Get or set the message that will be displayed. + */ + message?: string; + + /** + * Get the [action](ig.spreadsheet.SpreadsheetUserPromptTrigger) that caused the prompt to be displayed. + */ + trigger?: string; } interface WorkbookDirtiedEvent { @@ -75079,6 +77701,10 @@ interface WorkbookDirtiedEvent { } interface WorkbookDirtiedEventUIParam { + /** + * Gets a reference to the spreadsheet widget. + */ + owner?: any; } interface IgSpreadsheet { @@ -75162,12 +77788,24 @@ interface IgSpreadsheet { */ enterKeyNavigationDirection?: string; + /** + * Returns or sets the number of decimal places by which a whole number typed in during edit mode should be adjusted when isFixedDecimalEnabled is true + * + */ + fixedDecimalPlaceCount?: number; + /** * 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 whether a fixed decimal place is automatically added when a whole number is entered while in edit mode. + * + */ + isFixedDecimalEnabled?: boolean; + /** * Returns or sets a boolean indicating if the formula bar is displayed within the Spreadsheet. * @@ -75257,6 +77895,35 @@ interface IgSpreadsheet { */ activeWorksheetChanged?: ActiveWorksheetChangedEvent; + /** + * Invoked when the Spreadsheet is about to end the in-place editing of the activeCell. + */ + editModeExiting?: EditModeExitingEvent; + + /** + * Invoked when the Spreadsheet has ended the in-place editing of the activeCell. + */ + editModeExited?: EditModeExitedEvent; + + /** + * Invoked when the Spreadsheet is about to start in-place editing of the activeCell. + */ + editModeEntering?: EditModeEnteringEvent; + + /** + * Invoked when the Spreadsheet has started in-place editing of the activeCell. + */ + editModeEntered?: EditModeEnteredEvent; + + /** + * Invoked when the Spreadsheet is exiting edit mode and the new value for the activeCell is not valid based on the criteria of that cell's ig.excel.DataValidationRule. + * The EditModeValidationError is raised while exiting edit mode if the new value for the activeCell is not valid based on the criteria of that cell's ig.excel.DataValidationRule. + * Since the rule needs to evaluate the value of the cell and potentially other cell's in the Worksheet, the value is first applied to the cell(s) and then is validated. By default if the event is not handled and the + * showErrorMessageForInvalidValue is true, a message box will be displayed to the end user to determine what action to take. One can handle this event and specify the action that should + * be taken using the action.Note: The validation rule will not be evaluated if edit mode is being cancelled such as when the user presses Escape to cancel edit.Note: The action will default to AcceptChange if the ShowErrorMessageForInvalidValue of the validationRule is false; otherwise it will default to ShowPrompt.Note: Like Microsoft Excel, only the validation rule of the active cell is considered even if the update is affecting other cells in the selection. + */ + editModeValidationError?: EditModeValidationErrorEvent; + /** * 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. */ @@ -75304,13 +77971,23 @@ interface IgSpreadsheetMethods { /** * 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. + * 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 an enumeration used to indicate the current edit mode state. + */ + getCellEditMode(): Object; + + /** + * Returns a boolean indicating if the control is currently editing the value of the activeCell. + */ + getIsInEditMode(): boolean; + /** * Returns a boolean indicating if the user is currently editing the name of the active worksheet. */ @@ -75353,6 +78030,8 @@ interface JQuery { igSpreadsheet(methodName: "getActivePane"): Object; igSpreadsheet(methodName: "getActiveSelection"): Object; igSpreadsheet(methodName: "getActiveSelectionCellRangeFormat"): Object; + igSpreadsheet(methodName: "getCellEditMode"): Object; + igSpreadsheet(methodName: "getIsInEditMode"): boolean; igSpreadsheet(methodName: "getIsRenamingWorksheet"): boolean; igSpreadsheet(methodName: "getPanes"): void; igSpreadsheet(methodName: "executeAction", action: Object): boolean; @@ -75512,6 +78191,20 @@ interface JQuery { */ igSpreadsheet(optionLiteral: 'option', optionName: "enterKeyNavigationDirection", optionValue: string): void; + /** + * Returns the number of decimal places by which a whole number typed in during edit mode should be adjusted when isFixedDecimalEnabled is true + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "fixedDecimalPlaceCount"): number; + + /** + * Returns or sets the number of decimal places by which a whole number typed in during edit mode should be adjusted when isFixedDecimalEnabled is true + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "fixedDecimalPlaceCount", optionValue: number): void; + /** * Returns a boolean indicating whether the adjacent cell indicated by the enterKeyNavigationDirection should be navigated to when the enter key is pressed. * @@ -75526,6 +78219,20 @@ interface JQuery { */ igSpreadsheet(optionLiteral: 'option', optionName: "isEnterKeyNavigationEnabled", optionValue: boolean): void; + /** + * Returns a boolean indicating whether a fixed decimal place is automatically added when a whole number is entered while in edit mode. + * + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isFixedDecimalEnabled"): boolean; + + /** + * Returns or sets a boolean indicating whether a fixed decimal place is automatically added when a whole number is entered while in edit mode. + * + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "isFixedDecimalEnabled", optionValue: boolean): void; + /** * Returns a boolean indicating if the formula bar is displayed within the Spreadsheet. * @@ -75722,6 +78429,74 @@ interface JQuery { */ igSpreadsheet(optionLiteral: 'option', optionName: "activeWorksheetChanged", optionValue: ActiveWorksheetChangedEvent): void; + /** + * Invoked when the Spreadsheet is about to end the in-place editing of the activeCell. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeExiting"): EditModeExitingEvent; + + /** + * Invoked when the Spreadsheet is about to end the in-place editing of the activeCell. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeExiting", optionValue: EditModeExitingEvent): void; + + /** + * Invoked when the Spreadsheet has ended the in-place editing of the activeCell. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeExited"): EditModeExitedEvent; + + /** + * Invoked when the Spreadsheet has ended the in-place editing of the activeCell. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeExited", optionValue: EditModeExitedEvent): void; + + /** + * Invoked when the Spreadsheet is about to start in-place editing of the activeCell. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeEntering"): EditModeEnteringEvent; + + /** + * Invoked when the Spreadsheet is about to start in-place editing of the activeCell. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeEntering", optionValue: EditModeEnteringEvent): void; + + /** + * Invoked when the Spreadsheet has started in-place editing of the activeCell. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeEntered"): EditModeEnteredEvent; + + /** + * Invoked when the Spreadsheet has started in-place editing of the activeCell. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeEntered", optionValue: EditModeEnteredEvent): void; + + /** + * Invoked when the Spreadsheet is exiting edit mode and the new value for the activeCell is not valid based on the criteria of that cell's ig.excel.DataValidationRule. + * The EditModeValidationError is raised while exiting edit mode if the new value for the activeCell is not valid based on the criteria of that cell's ig.excel.DataValidationRule. + * Since the rule needs to evaluate the value of the cell and potentially other cell's in the Worksheet, the value is first applied to the cell(s) and then is validated. By default if the event is not handled and the + * showErrorMessageForInvalidValue is true, a message box will be displayed to the end user to determine what action to take. One can handle this event and specify the action that should + * be taken using the action.Note: The validation rule will not be evaluated if edit mode is being cancelled such as when the user presses Escape to cancel edit.Note: The action will default to AcceptChange if the ShowErrorMessageForInvalidValue of the validationRule is false; otherwise it will default to ShowPrompt.Note: Like Microsoft Excel, only the validation rule of the active cell is considered even if the update is affecting other cells in the selection. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeValidationError"): EditModeValidationErrorEvent; + + /** + * Invoked when the Spreadsheet is exiting edit mode and the new value for the activeCell is not valid based on the criteria of that cell's ig.excel.DataValidationRule. + * The EditModeValidationError is raised while exiting edit mode if the new value for the activeCell is not valid based on the criteria of that cell's ig.excel.DataValidationRule. + * Since the rule needs to evaluate the value of the cell and potentially other cell's in the Worksheet, the value is first applied to the cell(s) and then is validated. By default if the event is not handled and the + * showErrorMessageForInvalidValue is true, a message box will be displayed to the end user to determine what action to take. One can handle this event and specify the action that should + * be taken using the action.Note: The validation rule will not be evaluated if edit mode is being cancelled such as when the user presses Escape to cancel edit.Note: The action will default to AcceptChange if the ShowErrorMessageForInvalidValue of the validationRule is false; otherwise it will default to ShowPrompt.Note: Like Microsoft Excel, only the validation rule of the active cell is considered even if the update is affecting other cells in the selection. + * + * @optionValue New value to be set. + */ + igSpreadsheet(optionLiteral: 'option', optionName: "editModeValidationError", optionValue: EditModeValidationErrorEvent): 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. */ @@ -78003,6 +80778,30 @@ interface NodeCheckstateChangingEvent { } interface NodeCheckstateChangingEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the node object the checkbox of which is being interacted with. + */ + node?: any; + + /** + * Gets the current state of the checkbox. + */ + currentState?: string; + + /** + * Gets the new state that is going to be applied to the checkbox. + */ + newState?: string; + + /** + * Gets the collection of all checked nodes before the new state is applied. + */ + currentCheckedNodes?: any[]; } interface NodeCheckstateChangedEvent { @@ -78010,6 +80809,30 @@ interface NodeCheckstateChangedEvent { } interface NodeCheckstateChangedEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the node object the checkbox of which is being interacted with. + */ + node?: any; + + /** + * Gets the new state that is already applied to the checkbox. + */ + newState?: string; + + /** + * Gets the collection of all checked nodes. + */ + newCheckedNodes?: any[]; + + /** + * Gets the collection of all partially checked nodes. + */ + newPartiallyCheckedNodes?: any[]; } interface NodePopulatingEvent { @@ -78017,6 +80840,25 @@ interface NodePopulatingEvent { } interface NodePopulatingEventUIParam { + /** + * Gets the data-path attribute of the node being populated. + */ + path?: string; + + /** + * Gets a reference to the jQuery element of the node whose children are being populated. + */ + element?: string; + + /** + * Gets the node data. + */ + data?: any; + + /** + * Gets a reference to the bindings object for the level at which the populating node is located. + */ + binding?: any; } interface NodePopulatedEvent { @@ -78024,6 +80866,25 @@ interface NodePopulatedEvent { } interface NodePopulatedEventUIParam { + /** + * Gets the data-path atrribute of the populated node. + */ + path?: string; + + /** + * Gets a reference to the jQuery element of the node whose children are populated. + */ + element?: string; + + /** + * Gets the node data. + */ + data?: any; + + /** + * Gets a reference to the bindings object for the level at which the populated node is located. + */ + binding?: any; } interface NodeCollapsingEvent { @@ -78031,6 +80892,15 @@ interface NodeCollapsingEvent { } interface NodeCollapsingEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the node object about to collapse. + */ + node?: any; } interface NodeCollapsedEvent { @@ -78038,6 +80908,15 @@ interface NodeCollapsedEvent { } interface NodeCollapsedEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the collapsed node object. + */ + node?: any; } interface NodeExpandingEvent { @@ -78045,6 +80924,15 @@ interface NodeExpandingEvent { } interface NodeExpandingEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the node object about to expand. + */ + node?: any; } interface NodeExpandedEvent { @@ -78052,6 +80940,15 @@ interface NodeExpandedEvent { } interface NodeExpandedEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the expanded node object. + */ + node?: any; } interface NodeClickEvent { @@ -78059,6 +80956,15 @@ interface NodeClickEvent { } interface NodeClickEventUIParam { + /** + * Gets a reference to the tree. + */ + owner?: any; + + /** + * Gets a reference to the node object being clicked. + */ + node?: any; } interface NodeDoubleClickEvent { @@ -78066,6 +80972,25 @@ interface NodeDoubleClickEvent { } interface NodeDoubleClickEventUIParam { + /** + * Gets the data-path attribute of the double clicked node. + */ + path?: string; + + /** + * Gets a reference to the jQuery element of the double clicked node. + */ + element?: string; + + /** + * Gets the node data. + */ + data?: any; + + /** + * Gets a reference to the bindings object for the level at which the double clicked node is located. + */ + binding?: any; } interface NodeDroppingEvent { @@ -78073,6 +80998,45 @@ interface NodeDroppingEvent { } interface NodeDroppingEventUIParam { + /** + * Gets the target node data-path attribute. + */ + path?: string; + + /** + * Gets a reference to the jQuery element of the node. + */ + element?: string; + + /** + * Gets a reference to the target node data. + */ + data?: any; + + /** + * Gets a reference to the binding object for the level at which the target node is located. + */ + binding?: any; + + /** + * Gets a reference to the helper. + */ + helper?: string; + + /** + * Gets a reference to the offset. + */ + offset?: any; + + /** + * Gets a reference to the current position of the draggable element. + */ + position?: any; + + /** + * Gets a reference to the draggable element (the node). + */ + draggable?: string; } interface NodeDroppedEvent { @@ -78080,6 +81044,45 @@ interface NodeDroppedEvent { } interface NodeDroppedEventUIParam { + /** + * Gets the target node data-path attribute. + */ + path?: string; + + /** + * Gets a reference to the jQuery element of the node. + */ + element?: string; + + /** + * Gets a reference to the target node data. + */ + data?: any; + + /** + * Gets a reference to the binding object for the level at which the target node is located. + */ + binding?: any; + + /** + * Gets a reference to the helper. + */ + helper?: string; + + /** + * Gets a reference to the offset. + */ + offset?: any; + + /** + * Gets a reference to the current position of the draggable element. + */ + position?: any; + + /** + * Gets a reference to the draggable element (the node). + */ + draggable?: string; } interface IgTree { @@ -82968,6 +85971,11 @@ interface IgTreeGrid { */ dataSourceSettings?: IgTreeGridDataSourceSettings; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + restSettings?: any; + /** * 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). * @@ -83238,12 +86246,6 @@ interface IgTreeGrid { */ 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). * @@ -83551,10 +86553,10 @@ interface IgTreeGridMethods { /** * 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) + * 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. */ @@ -83715,25 +86717,25 @@ interface IgTreeGridMethods { /** * 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; @@ -83749,7 +86751,7 @@ interface IgTreeGridMethods { /** * 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. + * 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. @@ -83758,7 +86760,7 @@ interface IgTreeGridMethods { /** * 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. + * 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. @@ -83783,7 +86785,7 @@ interface IgTreeGridMethods { /** * Returns a record by a specified key (requires that primaryKey is set in the settings). - * That is a wrapper for this.dataSource.findRecordByKey(key). + * That is a wrapper for this.dataSource.findRecordByKey(key). * * @param key Primary key of the record */ @@ -83791,7 +86793,7 @@ interface IgTreeGridMethods { /** * 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). + * That is a wrapper for this.dataSource.getDetachedRecord(t). * * @param t A transaction object. */ @@ -83799,19 +86801,19 @@ interface IgTreeGridMethods { /** * 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(). + * 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(). + * 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(). + * That is a wrapper for this.dataSource.transactionsAsString(). */ transactionsAsString(): string; @@ -83839,8 +86841,8 @@ interface IgTreeGridMethods { /** * 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. + * 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; @@ -83858,7 +86860,7 @@ interface IgTreeGridMethods { /** * 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. + * 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) @@ -83867,7 +86869,7 @@ interface IgTreeGridMethods { /** * 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. + * 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) @@ -83926,7 +86928,7 @@ interface IgTreeGridMethods { /** * 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). + * 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 @@ -84231,6 +87233,18 @@ interface JQuery { */ igTreeGrid(optionLiteral: 'option', optionName: "dataSourceSettings", optionValue: IgTreeGridDataSourceSettings): void; + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + */ + igTreeGrid(optionLiteral: 'option', optionName: "restSettings"): any; + + /** + * This option is inherited from a parent widget and it's not applicable for the igTreeGrid. + * + * @optionValue New value to be set. + */ + igTreeGrid(optionLiteral: 'option', optionName: "restSettings", optionValue: any): 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). * @@ -84761,20 +87775,6 @@ interface JQuery { */ 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). * @@ -85403,6 +88403,25 @@ interface ContextRowRenderingEvent { } interface ContextRowRenderingEventUIParam { + /** + * Gets a reference to igTreeGridPaging. + */ + owner?: any; + + /** + * Gets reference to the first data row. Null if there are no records. + */ + dataRow?: any; + + /** + * Gets current page index. + */ + currentPageIndex?: number; + + /** + * Gets the current context row mode. + */ + contextRowMode?: string; } interface ContextRowRenderedEvent { @@ -85410,6 +88429,30 @@ interface ContextRowRenderedEvent { } interface ContextRowRenderedEventUIParam { + /** + * Gets a reference to igTreeGridPaging. + */ + owner?: any; + + /** + * Gets reference to the first data row. Null if there are no records. + */ + dataRow?: any; + + /** + * Gets current page index. + */ + currentPageIndex?: number; + + /** + * Gets 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[]; + + /** + * Gets the current context row mode. + */ + contextRowMode?: string; } interface IgTreeGridPaging { @@ -87249,28 +90292,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; @@ -89971,6 +93014,10 @@ interface FileSelectingEvent { } interface FileSelectingEventUIParam { + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface FileSelectedEvent { @@ -89978,6 +93025,20 @@ interface FileSelectedEvent { } interface FileSelectedEventUIParam { + /** + * Gets the unique identifier of the file. + */ + fileId?: number; + + /** + * Gets the name of the uploaded file. + */ + filePath?: string; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface FileUploadingEvent { @@ -89985,6 +93046,40 @@ interface FileUploadingEvent { } interface FileUploadingEventUIParam { + /** + * Gets the unique identifier of the file. + */ + fileId?: number; + + /** + * Gets the name of the uploaded file. + */ + filePath?: string; + + /** + * Gets the file size of the uploaded file. + */ + totalSize?: number; + + /** + * Gets the uploaded bytes. + */ + uploadedBytes?: number; + + /** + * Gets the current file status. + */ + fileStatus?: number; + + /** + * Gets reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + */ + fileInfo?: any; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface FileUploadedEvent { @@ -89992,6 +93087,30 @@ interface FileUploadedEvent { } interface FileUploadedEventUIParam { + /** + * Gets the unique identifier of the file. + */ + fileId?: number; + + /** + * Gets the name of the uploaded file. + */ + filePath?: string; + + /** + * Gets the file size of the uploaded file. + */ + totalSize?: number; + + /** + * Gets reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from server side), etc. + */ + fileInfo?: any; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface FileUploadAbortedEvent { @@ -89999,6 +93118,35 @@ interface FileUploadAbortedEvent { } interface FileUploadAbortedEventUIParam { + /** + * Gets the unique identifier of the file. + */ + fileId?: number; + + /** + * Gets the name of the uploaded file. + */ + filePath?: string; + + /** + * Gets the file size of the uploaded file. + */ + totalSize?: number; + + /** + * Gets the uploaded bytes. + */ + uploadedBytes?: number; + + /** + * Gets the current file status. + */ + fileStatus?: number; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface CancelAllClickedEvent { @@ -90006,6 +93154,10 @@ interface CancelAllClickedEvent { } interface CancelAllClickedEventUIParam { + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface OnErrorEvent { @@ -90013,6 +93165,35 @@ interface OnErrorEvent { } interface OnErrorEventUIParam { + /** + * Gets the current errorCode. + */ + errorCode?: number; + + /** + * Gets the 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?: number; + + /** + * Gets the detailed error description. + */ + errorMessage?: string; + + /** + * Gets the error type - it could be clientside or serverside. + */ + errorType?: string; + + /** + * Gets the specific server message returned by server - if errorType is serverside. + */ + serverMessage?: string; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface FileExtensionsValidatingEvent { @@ -90020,6 +93201,20 @@ interface FileExtensionsValidatingEvent { } interface FileExtensionsValidatingEventUIParam { + /** + * Gets the full file name. + */ + fileName?: string; + + /** + * Gets the file extension. + */ + fileExtension?: string; + + /** + * Gets the the igUpload widget object. + */ + owner?: any; } interface OnXHRLoadEvent { @@ -90027,6 +93222,25 @@ interface OnXHRLoadEvent { } interface OnXHRLoadEventUIParam { + /** + * Gets the unique identifier of the file. + */ + fileId?: number; + + /** + * Gets reference to the original XMLHttpRequest object. + */ + xhr?: any; + + /** + * Gets reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from the server-side), etc. + */ + fileInfo?: any; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface OnFormDataSubmitEvent { @@ -90034,6 +93248,30 @@ interface OnFormDataSubmitEvent { } interface OnFormDataSubmitEventUIParam { + /** + * Gets the unique identifier of the file. + */ + fileId?: number; + + /** + * Gets reference to the fileInfo object - containing information for fileName, fileSize, serverMessage(if returned from the server-side), etc. + */ + fileInfo?: any; + + /** + * Gets reference to the original XMLHttpRequest object(if the browser supports HTML 5 file API - if not it is undefined). + */ + xhr?: any; + + /** + * Gets reference to FormData object(if the browser supports HTML5 file API) OR reference to jQuery representation of

. + */ + formData?: any; + + /** + * Gets the igUpload widget object. + */ + owner?: any; } interface IgUpload { @@ -92262,7 +95500,7 @@ class IgValidatorCreditCardRule { /** * 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 + * using Luhn algorithm https://en.wikipedia.org/wiki/Luhn_algorithm * * @param options * @param value @@ -94518,6 +97756,10 @@ interface ZoomChangingEvent { } interface ZoomChangingEventUIParam { + /** + * Gets reference to igZoombar. + */ + owner?: any; } interface ZoomChangedEvent { @@ -94525,6 +97767,10 @@ interface ZoomChangedEvent { } interface ZoomChangedEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface ProviderCreatedEvent { @@ -94532,6 +97778,15 @@ interface ProviderCreatedEvent { } interface ProviderCreatedEventUIParam { + /** + * Gets a reference to the created provider. + */ + provider?: any; + + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface WindowDragStartingEvent { @@ -94539,6 +97794,10 @@ interface WindowDragStartingEvent { } interface WindowDragStartingEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface WindowDragStartedEvent { @@ -94546,6 +97805,10 @@ interface WindowDragStartedEvent { } interface WindowDragStartedEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface WindowDraggingEvent { @@ -94553,6 +97816,10 @@ interface WindowDraggingEvent { } interface WindowDraggingEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface WindowDragEndingEvent { @@ -94560,6 +97827,10 @@ interface WindowDragEndingEvent { } interface WindowDragEndingEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface WindowDragEndedEvent { @@ -94567,6 +97838,10 @@ interface WindowDragEndedEvent { } interface WindowDragEndedEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface WindowResizingEvent { @@ -94574,6 +97849,10 @@ interface WindowResizingEvent { } interface WindowResizingEventUIParam { + /** + * Gets reference to the igZoombar. + */ + owner?: any; } interface IgZoombar { @@ -95190,27 +98469,27 @@ interface JQuery { } interface IgLoader { - scriptPath: string; - cssPath: string; - resources?: string; - theme?: string; - ready?: Function; - localePath?: string; - locale?: string; - autoDetectLocale?: boolean; - regional?: string; - preinit?: Function; + scriptPath: string; + cssPath: string; + resources?: string; + theme?: string; + ready?: Function; + localePath?: string; + locale?: string; + autoDetectLocale?: boolean; + regional?: string; + preinit?: Function; } interface IgniteUIStatic { - tmpl(template: string, data: any, ...args: any[]): string; - loader(options: IgLoader): void; - loader(callback: Function): void; - loader(resources: string, callback: Function): void; - loader(): any; - OlapUtilities: any; + tmpl(template: string, data: any, ...args: any[]): string; + loader(options: IgLoader): void; + loader(callback: Function): void; + loader(resources: string, callback: Function): void; + loader(): any; + OlapUtilities: any; } interface JQueryStatic { - ig: IgniteUIStatic; + ig: IgniteUIStatic; } From 10452eb0788e99f5ba56dbc61e4fc7d4526f09e0 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Tue, 12 Sep 2017 15:12:50 -0400 Subject: [PATCH 019/486] Added 'static' to Model.remoteMethod Integrated the remoteMethod ideas from https://github.com/Sequoia/loopback-type-definitions/blob/master/loopback.d.ts into the existing type Improves remoteMethod composition and checking. No impact on other types --- types/loopback/index.d.ts | 162 +++++++++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/types/loopback/index.d.ts b/types/loopback/index.d.ts index 0fd42bde9d..49ee739f9e 100644 --- a/types/loopback/index.d.ts +++ b/types/loopback/index.d.ts @@ -2,6 +2,8 @@ // Project: https://github.com/strongloop/loopback // Definitions by: Andres D Jimenez // Tim Schumacher +// Sequoia McDowell +// Mike Crowe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -723,6 +725,164 @@ declare namespace l { equals(p: any): void; } + /** + * @interface + * @property {string} path HTTP path (relative to the model) at which the method is exposed. + * @property {'get' | 'post' | 'patch' | 'put' | 'del' | 'all'} verb HTTP method (verb) at which the method is available. + * @property {number} status Default HTTP status set when the callback is called without an error. + * @property {number} errorStatus Default HTTP status set when the callback is called with an error. + */ + interface RemoteHttpOptions { + /** + * HTTP path (relative to the model) at which the method is exposed. + * ``` + * http: {path: '/sayhi'} + * ``` + */ + path: string; + /** + * HTTP method (verb) at which the method is available. + * ``` + * http: {path: '/sayhi', verb: 'get'} + * ``` + * default = post + */ + verb: 'get' | 'post' | 'patch' | 'put' | 'del' | 'all'; + + /** + * status Default HTTP status set when the callback is called without an error. + * ``` + * {status: 201} + * ``` + */ + status?: number; + + /** + * errorStatus Default HTTP status set when the callback is called with an error. + * ``` + * {errorStatus: 400} + * ``` + */ + errorStatus?: number; + } + + /** + * @interface + * @property {Array} accepts Defines arguments that the remote method accepts + * @property {string|string[]} description Text description of the method + * @property {l.RemoteHttpOptions} http The HTTP options for the remote method + * @property {boolean} isStatic Whether the method is static (eg. `MyModel.myMethod`) + * @property {string | string[]} notes Additional notes, used by API documentation generators like Swagger. + * @property {l.RemoteMethodArgument} returns Describes the remote method's callback arguments + */ + interface RemoteMethodOptions { + /** + * Defines arguments that the remote method accepts. These arguments map to the static method you define. For the example above, you can see the function signature: + Person.greet(name, age, callback)... + `name` is the first argument, `age` is the second argument and callback is automatically provided by LoopBack (do not specify it in your `accepts` array). For more info, see Argument descriptions. + Default if not provided is the empty array, []. + { ... + accepts: [ + {arg: 'name', type: 'string'}, + {arg: 'age', type: 'number'},...], + ... } + */ + accepts?: Array; + + /** + * Text description of the method, used by API documentation generators such as Swagger. + You can put long strings in an array if needed (see note below). + */ + description?: string|string[]; + + /** + * + */ + http?: l.RemoteHttpOptions; + + /** + * + * boolean. Whether the method is static (eg. `MyModel.myMethod`). Use `false` to define the method on the prototype (for example, `MyModel.prototype.myMethod`). Default is true. + * default: true + */ + isStatic?: boolean; + + /** + * + Additional notes, used by API documentation generators like Swagger. + You can put long strings in an array if needed (see note below). + */ + notes? : string | string[]; + + /** + * Describes the remote method's callback arguments; See Argument descriptions. The err argument is assumed; do not specify. + * Default if not provided is the empty array, []. + * ``` + * returns: {arg: 'greeting', type: 'string'}` + * ``` + */ + returns?: l.RemoteMethodArgument; + } + + /** + * @interface + * @property {string} arg Argument name + * @property {string | string[]} description A text description of the argument. + * @property {any} http http Object or Function For input arguments: a function or an object describing mapping from HTTP request to the argument value. + * @property {boolean} required True if argument is required; false otherwise. + * @property {boolean} root For callback arguments: set this property to true if your function has a single callback argument to use as the root object returned to remote caller. Otherwise the root object returned is a map (argument-name to argument-value). + * @property {"any" | "Array" | "Boolean" | "Buffer" | "Date" | "GeoPoint" | "null" | "Number" | "Object" | "String"} type + * @property {string} default Default value that will be used to populate loopback-explorer input fields and swagger documentation + */ + interface RemoteMethodArgument { + /** + * Argument name + */ + arg: string; + /** + * A text description of the argument. This is used by API documentation generators like Swagger. + You can split long descriptions into arrays of strings (lines) to keep line lengths manageable. + ``` + [ + "Lorem ipsum dolor sit amet, consectetur adipiscing elit," + "sed do eiusmod tempor incididunt ut labore et dolore", + "magna aliqua." + ] + ``` + */ + description?: string | string[]; + /** + * http Object or Function For input arguments: a function or an object describing mapping from HTTP request to the argument value. See HTTP mapping of input arguments below. + * http.target + * Map the callback argument value to the HTTP response object. The following values are supported. + + * * status sets the res.statusCode to the provided value + * * header sets the http.header or arg named header to the value + */ + http?: l.RemoteHttpOptions; + + /** + * True if argument is required; false otherwise. + */ + required?: boolean; + + /** + * For callback arguments: set this property to true if your function has a single callback argument to use as the root object returned to remote caller. Otherwise the root object returned is a map (argument-name to argument-value). + */ + root?: boolean; + + /** + * Argument datatype; must be a Loopback type. Additionally, callback arguments allow a special type "file"; see below. + */ + type: "any" | "Array" | "Boolean" | "Buffer" | "Date" | "GeoPoint" | "null" | "Number" | "Object" | "String"; + + /** + * Default value that will be used to populate loopback-explorer input fields and swagger documentation. Note: This value will not be passed into remote methods function if argument is not present. + */ + default?: string; + } + + /** * The base class for **all models** * **Inheriting from `Model`* @@ -880,7 +1040,7 @@ declare namespace l { * @param {any} options The remoting options. * See [Remote methods - Options](docs.strongloop.com/display/LB/Remote+methods#Remotemethods-Options) */ - remoteMethod(name: string, options: any): void; + static remoteMethod(name: string, options: RemoteMethodOptions): void; /** * The `loopback.Model.extend()` method calls this when you create a model that extends another model. From 1a694f309c8e7cc49b24380b2a69bd17aa0c5e2e Mon Sep 17 00:00:00 2001 From: loopArray <525029662@qq.com> Date: Wed, 13 Sep 2017 10:07:02 +0800 Subject: [PATCH 020/486] add lost options member add comments --- types/jquery.simplepagination/index.d.ts | 210 ++++++++++++++++++++++- 1 file changed, 204 insertions(+), 6 deletions(-) diff --git a/types/jquery.simplepagination/index.d.ts b/types/jquery.simplepagination/index.d.ts index 14a8cc612b..09e4791560 100644 --- a/types/jquery.simplepagination/index.d.ts +++ b/types/jquery.simplepagination/index.d.ts @@ -7,34 +7,232 @@ /// interface SimplePaginationOptions { + /** + * Total number of items that will be used to calculate the pages. + * + * @type {number} + * @memberof SimplePaginationOptions + */ items?: number; + /** + * Number of items displayed on each page. + * + * @type {number} + * @memberof SimplePaginationOptions + */ itemsOnPage?: number; + /** + * If specified, items and itemsOnPage will not be used to calculate the number of pages. + * + * @type {number} + * @memberof SimplePaginationOptions + */ pages?: number; + /** + * How many page numbers should be visible while navigating. + * Minimum allowed: 3 (previous, current & next) + * + * @type {number} + * @memberof SimplePaginationOptions + */ displayedPages?: number; + /** + * How many page numbers are visible at the beginning/ending of the pagination. + * + * @type {number} + * @memberof SimplePaginationOptions + */ edges?: number; + /** + * Which page will be selected immediately after init. + * + * @type {number} + * @memberof SimplePaginationOptions + */ currentPage?: number; + /** + * A string used to build the href attribute, added before the page number. + * + * @type {string} + * @memberof SimplePaginationOptions + */ hrefTextPrefix?: string; + /** + * Another string used to build the href attribute, added after the page number. + * + * @type {string} + * @memberof SimplePaginationOptions + */ hrefTextSuffix?: string; + /** + * Text to be display on the previous button. + * + * @type {string} + * @memberof SimplePaginationOptions + */ prevText?: string; + /** + * Text to be display on the next button. + * + * @type {string} + * @memberof SimplePaginationOptions + */ nextText?: string; + /** + * The class of the CSS theme. + * + * @type {string} + * @memberof SimplePaginationOptions + */ cssStyle?: string; + /** + * Set to false if you don't want to select the page immediately after click. + * + * @type {boolean} + * @memberof SimplePaginationOptions + */ selectOnClick?: boolean; + useAnchors?: boolean, + ellipseText?: string; + /** + * When this option is true, + * clicking on the ellipse will replace the ellipse + * with a number type input in which you can manually set the resulting page. + * + * @type {boolean} + * @memberof SimplePaginationOptions + */ + ellipsePageSet?: boolean; + listStyle?: boolean; + /** + * A collection of labels that will be used to render the pagination items, replacing the numbers. + * + * @type {any[]} + * @memberof SimplePaginationOptions + */ + labelMap?: any[]; + nextAtFront?: boolean; + invertPageOrder?: boolean; + useStartEdge?: boolean; + useEndEdge?: boolean; + /** + * Function to call when a page is clicked. + * Page number and event are optional parameters. + * + * @memberof SimplePaginationOptions + */ onPageClick?: (page: number, event: any) => void; + /** + * Function to call when the pagination is initialized. + * + * @memberof SimplePaginationOptions + */ onInit?: () => void; } interface JQuery { pagination(options?: SimplePaginationOptions): JQuery; + /** + * selectPage - Select a page based on page number. + * + * @param selectPage + * @param {number} pageNumber + * @memberof JQuery + */ pagination(method: 'selectPage', pageNumber: number): void; - pagination(method: 'prevPage'): void; - pagination(method: 'nextPage'): void; + /** + * prevPage - Selects the previous page. + * + * @param prevPage + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'prevPage'): JQuery; + /** + * nextPage - Select the next page. + * + * @param nextPage + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'nextPage'): JQuery; + pagination(method: 'selectPage'): JQuery; + /** + * getPagesCount - Returns the total number of pages. + * + * @param getPagesCount + * @returns {number} + * @memberof JQuery + */ pagination(method: 'getPagesCount'): number; + pagination(method: 'setPagesCount', count: number): void; + /** + * getCurrentPage - Returns the current page number. + * + * @param getCurrentPage + * @returns {number} + * @memberof JQuery + */ pagination(method: 'getCurrentPage'): number; - pagination(method: 'disable'): void; - pagination(method: 'enable'): void; - pagination(method: 'destroy'): void; - pagination(method: 'redraw'): void; + /** + * disable - Disables pagination functionality. + * + * @param disable + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'disable'): JQuery; + /** + * enable - Enables the pagination after it was previously disabled. + * + * @param enable + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'enable'): JQuery; + /** + * destroy - Visually destroys the pagination, any existing settings are kept. + * + * @param destroy + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'destroy'): JQuery; + /** + * redraw - The pagination is drawn again using the existing settings. (useful after you have destroyed a pagination for example) + * + * @param redraw + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'redraw'): JQuery; + /** + * drawPage - takes a page number as a parameter and it sets the "currentPage" value to the given page number and draws the pagination + * + * @param drawPage + * @param {number} pageNumber + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'drawPage', pageNumber: number): JQuery; + /** + * updateItems - allows to dynamically change how many items are rendered by the pagination + * + * @param updateItems + * @param {number} items + * @memberof JQuery + */ pagination(method: 'updateItems', items: number): void; + /** + * updateItemsOnPage - allows to dynamically change how many items are rendered on each page + * + * @param updateItemsOnPage + * @param {number} itemsOnPage + * @returns {JQuery} + * @memberof JQuery + */ + pagination(method: 'updateItemsOnPage', itemsOnPage: number): JQuery; + pagination(method: 'getItemsOnPage'): number; pagination(method: string): any; pagination(method: string, value: any): any; } From 4e0f63638ddd685333ca1a9f7178f600f18e0f9e Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 13 Sep 2017 07:55:25 -0400 Subject: [PATCH 021/486] Updating comment in remoteMethod JSDoc Added simple test for remoteMethod --- types/loopback/index.d.ts | 2 +- types/loopback/loopback-tests.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/types/loopback/index.d.ts b/types/loopback/index.d.ts index 49ee739f9e..8b7656f3f6 100644 --- a/types/loopback/index.d.ts +++ b/types/loopback/index.d.ts @@ -1037,7 +1037,7 @@ declare namespace l { * Model.remoteMethod('myMethod'); * `` * @param {string} name The name of the method. - * @param {any} options The remoting options. + * @param {RemoteMethodOptions} options The remoting options. * See [Remote methods - Options](docs.strongloop.com/display/LB/Remote+methods#Remotemethods-Options) */ static remoteMethod(name: string, options: RemoteMethodOptions): void; diff --git a/types/loopback/loopback-tests.ts b/types/loopback/loopback-tests.ts index d9a83b56a7..1c9dc6a3ea 100644 --- a/types/loopback/loopback-tests.ts +++ b/types/loopback/loopback-tests.ts @@ -28,12 +28,13 @@ class Server { console.dir(data.name); } - model.findOne({}, (err, instance) => { + model.findOne({}, (err: Error, instance: TestModel) => { if (err) { console.dir(err); } console.dir(instance.name); }); + model.remoteMethod('fakeReturn', {}); }; } } From 4229b17124fb28940216a5efa84c2931ac99b85a Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 13 Sep 2017 08:46:02 -0400 Subject: [PATCH 022/486] Fixing dtslint issues --- types/loopback/index.d.ts | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/types/loopback/index.d.ts b/types/loopback/index.d.ts index 8b7656f3f6..bd98db660f 100644 --- a/types/loopback/index.d.ts +++ b/types/loopback/index.d.ts @@ -768,18 +768,19 @@ declare namespace l { /** * @interface - * @property {Array} accepts Defines arguments that the remote method accepts + * @property {RemoteMethodArgument[]} accepts Defines arguments that the remote method accepts * @property {string|string[]} description Text description of the method - * @property {l.RemoteHttpOptions} http The HTTP options for the remote method + * @property {RemoteHttpOptions} http The HTTP options for the remote method * @property {boolean} isStatic Whether the method is static (eg. `MyModel.myMethod`) * @property {string | string[]} notes Additional notes, used by API documentation generators like Swagger. - * @property {l.RemoteMethodArgument} returns Describes the remote method's callback arguments + * @property {RemoteMethodArgument} returns Describes the remote method's callback arguments */ interface RemoteMethodOptions { /** * Defines arguments that the remote method accepts. These arguments map to the static method you define. For the example above, you can see the function signature: Person.greet(name, age, callback)... - `name` is the first argument, `age` is the second argument and callback is automatically provided by LoopBack (do not specify it in your `accepts` array). For more info, see Argument descriptions. + `name` is the first argument, `age` is the second argument and callback is automatically provided by LoopBack (do not specify it in your `accepts` array). + For more info, see Argument descriptions. Default if not provided is the empty array, []. { ... accepts: [ @@ -787,7 +788,7 @@ declare namespace l { {arg: 'age', type: 'number'},...], ... } */ - accepts?: Array; + accepts?: RemoteMethodArgument[]; /** * Text description of the method, used by API documentation generators such as Swagger. @@ -798,7 +799,7 @@ declare namespace l { /** * */ - http?: l.RemoteHttpOptions; + http?: RemoteHttpOptions; /** * @@ -812,7 +813,7 @@ declare namespace l { Additional notes, used by API documentation generators like Swagger. You can put long strings in an array if needed (see note below). */ - notes? : string | string[]; + notes?: string | string[]; /** * Describes the remote method's callback arguments; See Argument descriptions. The err argument is assumed; do not specify. @@ -821,7 +822,7 @@ declare namespace l { * returns: {arg: 'greeting', type: 'string'}` * ``` */ - returns?: l.RemoteMethodArgument; + returns?: RemoteMethodArgument; } /** @@ -830,7 +831,7 @@ declare namespace l { * @property {string | string[]} description A text description of the argument. * @property {any} http http Object or Function For input arguments: a function or an object describing mapping from HTTP request to the argument value. * @property {boolean} required True if argument is required; false otherwise. - * @property {boolean} root For callback arguments: set this property to true if your function has a single callback argument to use as the root object returned to remote caller. Otherwise the root object returned is a map (argument-name to argument-value). + * @property {boolean} root For callback arguments: set this property to true if your function has a single callback argument. Otherwise the root object returned is an object * @property {"any" | "Array" | "Boolean" | "Buffer" | "Date" | "GeoPoint" | "null" | "Number" | "Object" | "String"} type * @property {string} default Default value that will be used to populate loopback-explorer input fields and swagger documentation */ @@ -859,7 +860,7 @@ declare namespace l { * * status sets the res.statusCode to the provided value * * header sets the http.header or arg named header to the value */ - http?: l.RemoteHttpOptions; + http?: RemoteHttpOptions; /** * True if argument is required; false otherwise. @@ -867,7 +868,8 @@ declare namespace l { required?: boolean; /** - * For callback arguments: set this property to true if your function has a single callback argument to use as the root object returned to remote caller. Otherwise the root object returned is a map (argument-name to argument-value). + * For callback arguments: set this property to true if your function has a single callback argument to use as the root object returned to remote caller. + * Otherwise the root object returned is a map (argument-name to argument-value). */ root?: boolean; @@ -877,12 +879,12 @@ declare namespace l { type: "any" | "Array" | "Boolean" | "Buffer" | "Date" | "GeoPoint" | "null" | "Number" | "Object" | "String"; /** - * Default value that will be used to populate loopback-explorer input fields and swagger documentation. Note: This value will not be passed into remote methods function if argument is not present. + * Default value that will be used to populate loopback-explorer input fields and swagger documentation. + * Note: This value will not be passed into remote methods function if argument is not present. */ default?: string; } - /** * The base class for **all models** * **Inheriting from `Model`* From d49daac9b610178c6c408944c1074ad190304409 Mon Sep 17 00:00:00 2001 From: Michael Glitzos Date: Wed, 13 Sep 2017 13:11:16 +0000 Subject: [PATCH 023/486] Fixed errors from running tests. Travis CI should pass now --- types/react-bootstrap-table/index.d.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/types/react-bootstrap-table/index.d.ts b/types/react-bootstrap-table/index.d.ts index 80c6eb3935..0c30bea6b4 100644 --- a/types/react-bootstrap-table/index.d.ts +++ b/types/react-bootstrap-table/index.d.ts @@ -87,7 +87,7 @@ export interface BootstrapTableProps extends Props { /** If set, data is remote (use also fetchInfo) */ - remote?: boolean | (remobeObj: RemoteObjSpec) => RemoteObjSpec, // Updated to support ^3.0.0 + 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 @@ -600,6 +600,10 @@ export interface TableHeaderColumnProps extends Props { True to hide column. */ hidden?: boolean; + /** + * True to hide from insert dialog + */ + hiddenOnInsert?: boolean; /** True to hide the dropdown for sizePerPage. */ From 1e8c96d196e8f768e5f078986c47956a6a19fb35 Mon Sep 17 00:00:00 2001 From: Mike Crowe Date: Wed, 13 Sep 2017 11:49:44 -0400 Subject: [PATCH 024/486] Updated test example with real parameters --- types/loopback/loopback-tests.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/types/loopback/loopback-tests.ts b/types/loopback/loopback-tests.ts index 1c9dc6a3ea..4cd7acd272 100644 --- a/types/loopback/loopback-tests.ts +++ b/types/loopback/loopback-tests.ts @@ -34,7 +34,14 @@ class Server { } console.dir(instance.name); }); - model.remoteMethod('fakeReturn', {}); + model.remoteMethod('getStuff', { + description: "Get some stuff", + accepts: [ + {arg: 'aParam', type: "String", required: true, description: "A parameter to process"} + ], + http: {verb: "get", path: "/get-stuff"}, + returns: {arg: "res", type: "Object"}, + }); }; } } From b3e0e23662c07079d3e2139f69dbc2ca26bb0cc7 Mon Sep 17 00:00:00 2001 From: doronbrikman Date: Thu, 14 Sep 2017 00:13:49 +0300 Subject: [PATCH 025/486] update ColorWrap types --- .../lib/components/common/ColorWrap.d.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/types/react-color/lib/components/common/ColorWrap.d.ts b/types/react-color/lib/components/common/ColorWrap.d.ts index 94a8f5b789..a1d44e152f 100644 --- a/types/react-color/lib/components/common/ColorWrap.d.ts +++ b/types/react-color/lib/components/common/ColorWrap.d.ts @@ -1,11 +1,19 @@ import { ComponentClass, StatelessComponent } from "react"; -import { HSLColor, RGBColor, ColorChangeHandler } from "react-color"; +import { HSLColor, RGBColor, ColorChangeHandler, Color, ColorResult } from "react-color"; + +export type CustomColorChangeHandler = (color: Color | ColorResult) => void; export interface InjectedColorProps { hex?: string; hsl?: HSLColor; rgb?: RGBColor; - onChange?: ColorChangeHandler; + onChange?: CustomColorChangeHandler; } -export default function CustomPicker(component: ComponentClass | StatelessComponent): ComponentClass; +export interface ExportedColorProps { + color?: Color; + onChange?: ColorChangeHandler; + onChangeComplete?: ColorChangeHandler; +} + +export default function CustomPicker(component: ComponentClass | StatelessComponent): ComponentClass; From 8a97be7ecf717a3a98bd190bb621feeef5eb8ddc Mon Sep 17 00:00:00 2001 From: doronbrikman Date: Thu, 14 Sep 2017 00:22:20 +0300 Subject: [PATCH 026/486] change type name --- types/react-color/lib/components/common/ColorWrap.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-color/lib/components/common/ColorWrap.d.ts b/types/react-color/lib/components/common/ColorWrap.d.ts index a1d44e152f..ce7b562a7f 100644 --- a/types/react-color/lib/components/common/ColorWrap.d.ts +++ b/types/react-color/lib/components/common/ColorWrap.d.ts @@ -1,13 +1,13 @@ import { ComponentClass, StatelessComponent } from "react"; import { HSLColor, RGBColor, ColorChangeHandler, Color, ColorResult } from "react-color"; -export type CustomColorChangeHandler = (color: Color | ColorResult) => void; +export type ColorWrapChangeHandler = (color: Color | ColorResult) => void; export interface InjectedColorProps { hex?: string; hsl?: HSLColor; rgb?: RGBColor; - onChange?: CustomColorChangeHandler; + onChange?: ColorWrapChangeHandler; } export interface ExportedColorProps { From 5284a022c81ee8719ef06419d966256e66603f09 Mon Sep 17 00:00:00 2001 From: ikatyang Date: Thu, 14 Sep 2017 11:49:21 +0800 Subject: [PATCH 027/486] feat(prettier): update to version 1.7 --- types/prettier/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/prettier/index.d.ts b/types/prettier/index.d.ts index 317a514912..1ed2568a1e 100644 --- a/types/prettier/index.d.ts +++ b/types/prettier/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for prettier 1.6 +// Type definitions for prettier 1.7 // Project: https://github.com/prettier/prettier // Definitions by: Ika // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -62,6 +62,11 @@ export interface Options { * Specify the input filepath. This will be used to do parser inference. */ filepath?: string; + /** + * Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. + * This is very useful when gradually transitioning large, unformatted codebases to prettier. + */ + requirePragma?: boolean; } export interface CursorOptions extends Options { From 2fc820f4295a2eeed6165c65ed970a18b0a77b1c Mon Sep 17 00:00:00 2001 From: Matthias Kannwischer Date: Thu, 14 Sep 2017 13:27:46 +0200 Subject: [PATCH 028/486] [angular-strap] updated all options to 2.3.8 --- types/angular-strap/index.d.ts | 113 +++++++++++++++++++++++---------- 1 file changed, 81 insertions(+), 32 deletions(-) diff --git a/types/angular-strap/index.d.ts b/types/angular-strap/index.d.ts index 9aebcdf480..d67c003da8 100644 --- a/types/angular-strap/index.d.ts +++ b/types/angular-strap/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for angular-strap v2.3.x // Project: http://mgcrea.github.io/angular-strap/ // Definitions by: Sam Herrmann +// Matthias Kannwischer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -44,17 +45,18 @@ declare namespace mgcrea.ngStrap { container?: string | boolean; controller?: any; controllerAs?: string; + resolve?: any; + locals?: any; template?: string; templateUrl?: string; contentTemplate?: string; - prefixClass?: string; prefixEvent?: string; id?: string; scope?: ng.IScope; - onBeforeHide?: (modal: IModal) => void; - onHide?: (modal: IModal) => void; - onBeforeShow?: (modal: IModal) => void; onShow?: (modal: IModal) => void; + onBeforeShow?: (modal: IModal) => void; + onHide?: (modal: IModal) => void; + onBeforeHide?: (modal: IModal) => void; } interface IModalScope extends ng.IScope { @@ -97,9 +99,16 @@ declare namespace mgcrea.ngStrap { keyboard?: boolean; show?: boolean; container?: string | boolean; + controller?: any; + controllerAs?: string; template?: string; + templateUrl?: string; contentTemplate?: string; scope?: ng.IScope; + onShow?: (aside: IAside) => void; + onBeforeShow?: (aside: IAside) => void; + onHide?: (aside: IAside) => void; + onBeforeHide?: (aside: IAside) => void; } interface IAsideScope extends ng.IScope { @@ -139,12 +148,18 @@ declare namespace mgcrea.ngStrap { title?: string; content?: string; type?: string; - keyboard?: boolean; show?: boolean; container?: string | boolean; + controller?: any; + controllerAs?: string; template?: string; + templateUrl?: string; duration?: number | boolean; dismissable?: boolean; + onShow?: (alert: IAlert) => void; + onBeforeShow?: (alert: IAlert) => void; + onHide?: (alert: IAlert) => void; + onBeforeHide?: (alert: IAlert) => void; } interface IAlertScope extends ng.IScope { @@ -183,13 +198,18 @@ declare namespace mgcrea.ngStrap { trigger?: string; title?: string; html?: boolean; - delay?: number | { show: number; hide: number}; + delay?: number | { show: number; hide: number }; container?: string | boolean; target?: string | ng.IAugmentedJQuery | boolean; template?: string; - contentTemplate?: string; + templateUrl?: string; + titleTemplate?: string; prefixEvent?: string; id?: string; + onShow?: (tooltip: ITooltip) => void; + onBeforeShow?: (tooltip: ITooltip) => void; + onHide?: (tooltip: ITooltip) => void; + onBeforeHide?: (tooltip: ITooltip) => void; viewport?: string | { selector: string; padding: string | number }; } @@ -235,9 +255,14 @@ declare namespace mgcrea.ngStrap { container?: string | boolean; target?: string | ng.IAugmentedJQuery | boolean; template?: string; + templateUrl?: string; contentTemplate?: string; autoClose?: boolean; id?: string; + onShow?: (popover: IPopover) => void; + onBeforeShow?: (popover: IPopover) => void; + onHide?: (popover: IPopover) => void; + onBeforeHide?: (popover: IPopover) => void; viewport?: string | { selector: string; padding: string | number }; } @@ -286,6 +311,12 @@ declare namespace mgcrea.ngStrap { comparator?: string; id?: string; watchOptions?: boolean; + trimValue?: boolean; + onShow?: (typeahead: ITypeahead) => void; + onBeforeShow?: (typeahead: ITypeahead) => void; + onHide?: (typeahead: ITypeahead) => void; + onBeforeHide?: (typeahead: ITypeahead) => void; + onSelect?: (typeahead: ITypeahead) => void; } } @@ -329,6 +360,10 @@ declare namespace mgcrea.ngStrap { delay?: number | { show: number; hide: number }; container?: string | boolean; template?: string; + onShow?: (datepicker: IDatepicker) => void; + onBeforeShow?: (datepicker: IDatepicker) => void; + onHide?: (datepicker: IDatepicker) => void; + onBeforeHide?: (datepicker: IDatepicker) => void; dateFormat?: string; modelDateFormat?: string; dateType?: string; @@ -376,6 +411,10 @@ declare namespace mgcrea.ngStrap { delay?: number | { show: number; hide: number; }; container?: string | boolean; template?: string; + onShow?: (timepicker: ITimepicker) => void; + onBeforeShow?: (timepicker: ITimepicker) => void; + onHide?: (timepicker: ITimepicker) => void; + onBeforeHide?: (timepicker: ITimepicker) => void; timeFormat?: string; modelTimeFormat?: string; timeType?: string; @@ -427,23 +466,28 @@ declare namespace mgcrea.ngStrap { } interface ISelectOptions { - animation?: string; - placement?: string; - trigger?: string; - html?: boolean; - delay?: number | { show: number; hide: number; }; - container?: string | boolean; - template?: string; - multiple?: boolean; - allNoneButtons?: boolean; - allText?: string; - noneText?: string; - maxLength?: number; - maxLengthHtml?: string; - sort?: boolean; - placeholder?: string; - iconCheckmark?: string; - id?: string; + animation?: string; + placement?: string; + trigger?: string; + html?: boolean; + delay?: number | { show: number; hide: number; }; + container?: string | boolean; + template?: string; + toggle?: boolean; + onShow?: (select: ISelect) => void; + onBeforeShow?: (select: ISelect) => void; + onHide?: (select: ISelect) => void; + onBeforeHide?: (select: ISelect) => void; + multiple?: boolean; + allNoneButtons?: boolean; + allText?: string; + noneText?: string; + maxLength?: number; + maxLengthHtml?: string; + sort?: boolean; + placeholder?: string; + iconCheckmark?: string; + id?: string; } } @@ -515,13 +559,18 @@ declare namespace mgcrea.ngStrap { } interface IDropdownOptions { - animation?: string; - placement?: string; - trigger?: string; - html?: boolean; - delay?: number | { show: number; hide: number; }; - container?: string | boolean; - template?: string; + animation?: string; + placement?: string; + trigger?: string; + html?: boolean; + delay?: number | { show: number; hide: number; }; + container?: string | boolean; + template?: string; + templateUrl?: string; + onShow?: (dropdown: IDropdown) => void; + onBeforeShow?: (dropdown: IDropdown) => void; + onHide?: (dropdown: IDropdown) => void; + onBeforeHide?: (dropdown: IDropdown) => void; } } @@ -567,7 +616,7 @@ declare namespace mgcrea.ngStrap { checkOffsets: () => void; trackElement: (target: any, source: any) => void; untrackElement: (target: any, source: any) => void; - activate: (index: number) => void; + activate: (index: number) => void; } interface IScrollspyOptions { From bbe84f69f302c263e9dc3f3d05c1b8b300ee69e4 Mon Sep 17 00:00:00 2001 From: Matthias Kannwischer Date: Thu, 14 Sep 2017 13:36:47 +0200 Subject: [PATCH 029/486] [angular-strap] added tslint and resolved linting issues --- types/angular-strap/angular-strap-tests.ts | 160 ++++------ types/angular-strap/index.d.ts | 336 +++++++++------------ types/angular-strap/tslint.json | 8 + 3 files changed, 211 insertions(+), 293 deletions(-) create mode 100644 types/angular-strap/tslint.json diff --git a/types/angular-strap/angular-strap-tests.ts b/types/angular-strap/angular-strap-tests.ts index 64e51a238b..29432ee069 100644 --- a/types/angular-strap/angular-strap-tests.ts +++ b/types/angular-strap/angular-strap-tests.ts @@ -1,5 +1,4 @@ namespace angularStrapTests { - import ngStrap = mgcrea.ngStrap; /////////////////////////////////////////////////////////////////////////// @@ -7,9 +6,8 @@ namespace angularStrapTests { /////////////////////////////////////////////////////////////////////////// namespace modalTests { - interface IDemoCtrlScope extends ngStrap.modal.IModalScope { - showModal: () => void; + showModal(): void; } angular.module('demoApp') @@ -17,23 +15,22 @@ namespace angularStrapTests { .controller('demoCtrl', demoCtrl); function demoCtrl($scope: IDemoCtrlScope, - $modal: ngStrap.modal.IModalService): void { - - var myModalOptions: ngStrap.modal.IModalOptions = {}; + $modal: ngStrap.modal.IModalService): void { + const myModalOptions: ngStrap.modal.IModalOptions = {}; myModalOptions.title = 'My Title'; myModalOptions.content = 'Hello Modal
This is a multiline message!'; myModalOptions.show = true; - var myModal = $modal(myModalOptions); + const myModal = $modal(myModalOptions); - var myOtherModalOptions: ngStrap.modal.IModalOptions = {}; + const myOtherModalOptions: ngStrap.modal.IModalOptions = {}; myOtherModalOptions.scope = $scope; myOtherModalOptions.template = 'modal/docs/modal.demo.tpl.html'; myOtherModalOptions.show = false; - myOtherModalOptions.controller = demoCtrl; + myOtherModalOptions.controller = demoCtrl; myOtherModalOptions.controllerAs = "ctrl"; - var myOtherModal = $modal(myOtherModalOptions); + const myOtherModal = $modal(myOtherModalOptions); $scope.showModal = (): void => { myOtherModal.$promise.then(myOtherModal.show); @@ -41,39 +38,36 @@ namespace angularStrapTests { } function $modalConfig($modalProvider: ngStrap.modal.IModalProvider): void { - var defaults: ngStrap.modal.IModalOptions = { + const defaults: ngStrap.modal.IModalOptions = { animation: 'am-flip-x' - } + }; angular.extend($modalProvider.defaults, defaults); } } - /////////////////////////////////////////////////////////////////////////// // Aside /////////////////////////////////////////////////////////////////////////// namespace asideTests { - angular.module('demoApp') .config($asideConfig) .controller('demoCtrl', demoCtrl); function demoCtrl($scope: ngStrap.aside.IAsideScope, - $aside: ngStrap.aside.IAsideService): void { - - var myAsideOptions: ngStrap.aside.IAsideOptions = {}; + $aside: ngStrap.aside.IAsideService): void { + const myAsideOptions: ngStrap.aside.IAsideOptions = {}; myAsideOptions.title = 'My Title'; myAsideOptions.content = 'My content'; myAsideOptions.show = true; - var myAside = $aside(myAsideOptions); + const myAside = $aside(myAsideOptions); - var myOtherAsideOptions: ngStrap.aside.IAsideOptions = {}; + const myOtherAsideOptions: ngStrap.aside.IAsideOptions = {}; myOtherAsideOptions.scope = $scope; myOtherAsideOptions.template = 'aside/docs/aside.demo.tpl.html'; - var myOtherAside = $aside(); + const myOtherAside = $aside(); myOtherAside.$promise.then(() => { myOtherAside.show(); @@ -81,7 +75,7 @@ namespace angularStrapTests { } function $asideConfig($asideProvider: ngStrap.aside.IAsideProvider): void { - var defaults: ngStrap.aside.IAsideOptions = {}; + const defaults: ngStrap.aside.IAsideOptions = {}; defaults.animation = 'am-fadeAndSlideLeft'; defaults.placement = 'left'; @@ -89,91 +83,84 @@ namespace angularStrapTests { } } - /////////////////////////////////////////////////////////////////////////// // Alert /////////////////////////////////////////////////////////////////////////// namespace alertTests { - angular.module('demoApp') .config($alertConfig) .controller('demoCtrl', demoCtrl); function demoCtrl($scope: ngStrap.alert.IAlertScope, - $alert: ngStrap.alert.IAlertService): void { - - var options: ngStrap.alert.IAlertOptions = {}; + $alert: ngStrap.alert.IAlertService): void { + const options: ngStrap.alert.IAlertOptions = {}; options.title = 'Holy guacamole!'; options.content = 'Best check yo self, you\'re not looking too good.'; options.placement = 'top'; options.type = 'info'; options.show = true; - var myAlert = $alert(); + const myAlert = $alert(); } function $alertConfig($alertProvider: ngStrap.alert.IAlertProvider): void { - var defaults: ngStrap.alert.IAlertOptions = {}; + const defaults: ngStrap.alert.IAlertOptions = {}; defaults.animation = 'am-fade-and-slide-top'; defaults.placement = 'top'; angular.extend($alertProvider.defaults, defaults); - }; + } } - /////////////////////////////////////////////////////////////////////////// // Tooltip /////////////////////////////////////////////////////////////////////////// namespace tooltipTests { - angular.module('demoApp') .config($tooltipConfig) .controller('demoDrct', demoDrct); function demoDrct($tooltip: ngStrap.tooltip.ITooltipService): ng.IDirective { - var drct: ng.IDirective = {}; + const drct: ng.IDirective = {}; drct.restrict = 'EA'; drct.link = link; return drct; function link(scope: ng.IScope, elem: ng.IAugmentedJQuery, attrs: ng.IAttributes): void { - var options: ngStrap.tooltip.ITooltipOptions = {}; + const options: ngStrap.tooltip.ITooltipOptions = {}; options.title = 'My Title'; $tooltip(elem, options); } } function $tooltipConfig($tooltipProvider: ngStrap.tooltip.ITooltipProvider): void { - var defaults: ngStrap.tooltip.ITooltipOptions = {}; + const defaults: ngStrap.tooltip.ITooltipOptions = {}; defaults.animation = 'am-flip-x'; defaults.trigger = 'hover'; angular.extend($tooltipProvider.defaults, defaults); - }; + } } - /////////////////////////////////////////////////////////////////////////// // Popover /////////////////////////////////////////////////////////////////////////// namespace popoverTests { - angular.module('demoApp') .config($popoverConfig) .controller('demoDrct', demoDrct); function demoDrct($popover: ngStrap.popover.IPopoverService): ng.IDirective { - var drct: ng.IDirective = {}; + const drct: ng.IDirective = {}; drct.restrict = 'EA'; drct.link = link; return drct; function link(scope: ng.IScope, elem: ng.IAugmentedJQuery, attrs: ng.IAttributes): void { - var options: ngStrap.tooltip.ITooltipOptions = {}; + const options: ngStrap.tooltip.ITooltipOptions = {}; options.title = 'My Title'; $popover(elem, options); @@ -181,84 +168,76 @@ namespace angularStrapTests { } function $popoverConfig($popoverProvider: ngStrap.popover.IPopoverProvider): void { - var defaults: ngStrap.tooltip.ITooltipOptions = {} + const defaults: ngStrap.tooltip.ITooltipOptions = {}; defaults.animation = 'am-flip-x'; defaults.trigger = 'hover'; angular.extend($popoverProvider.defaults, defaults); - }; + } } - /////////////////////////////////////////////////////////////////////////// // Typeahead /////////////////////////////////////////////////////////////////////////// namespace typeaheadTests { - angular.module('myApp') .config($typeaheadConfig); function $typeaheadConfig($typeaheadProvider: ngStrap.typeahead.ITypeaheadProvider) { - var defaults: ngStrap.typeahead.ITypeaheadOptions = {} - defaults.animation = 'am-flip-x'; - defaults.minLength = 2; - defaults.limit = 8; + const defaults: ngStrap.typeahead.ITypeaheadOptions = {}; + defaults.animation = 'am-flip-x'; + defaults.minLength = 2; + defaults.limit = 8; - angular.extend($typeaheadProvider.defaults, defaults); + angular.extend($typeaheadProvider.defaults, defaults); } } - /////////////////////////////////////////////////////////////////////////// // Datepicker /////////////////////////////////////////////////////////////////////////// namespace datepickerTests { - angular.module('myApp') .config($datepickerConfig); function $datepickerConfig($datepickerProvider: ngStrap.datepicker.IDatepickerProvider): void { - var defaults: ngStrap.datepicker.IDatepickerOptions = {}; + const defaults: ngStrap.datepicker.IDatepickerOptions = {}; defaults.dateFormat = 'dd/MM/yyyy'; defaults.startWeek = 1; angular.extend($datepickerProvider.defaults, defaults); - }; + } } - /////////////////////////////////////////////////////////////////////////// // Timepicker /////////////////////////////////////////////////////////////////////////// namespace timepickerTests { - angular.module('myApp') .config($timepickerConfig); function $timepickerConfig($timepickerProvider: ngStrap.timepicker.ITimepickerProvider): void { - var defaults: ngStrap.timepicker.ITimepickerOptions = {}; + const defaults: ngStrap.timepicker.ITimepickerOptions = {}; defaults.timeFormat = 'HH:mm'; defaults.length = 7; angular.extend($timepickerProvider.defaults, defaults); - }; + } } - /////////////////////////////////////////////////////////////////////////// // Select /////////////////////////////////////////////////////////////////////////// namespace selectTests { - angular.module('myApp') .config($selectConfig); function $selectConfig($selectProvider: ngStrap.select.ISelectProvider): void { - var defaults: ngStrap.select.ISelectOptions = {}; + const defaults: ngStrap.select.ISelectOptions = {}; defaults.animation = 'am-flip-x'; defaults.sort = false; @@ -266,21 +245,19 @@ namespace angularStrapTests { } } - /////////////////////////////////////////////////////////////////////////// // Tabs /////////////////////////////////////////////////////////////////////////// namespace tabTests { - angular.module('myApp') .config($tabConfig); function $tabConfig($tabProvider: ngStrap.tab.ITabProvider) { - var defaults: ngStrap.tab.ITabOptions = {}; - defaults.animation = 'am-flip-x'; + const defaults: ngStrap.tab.ITabOptions = {}; + defaults.animation = 'am-flip-x'; - angular.extend($tabProvider.defaults, defaults); + angular.extend($tabProvider.defaults, defaults); } } @@ -289,89 +266,80 @@ namespace angularStrapTests { /////////////////////////////////////////////////////////////////////////// namespace collapseTests { - angular.module('myApp') .config($collapseConfig); - function $collapseConfig($collapseProvider: ngStrap.collapse.ICollapseProvider):void { - var defaults: ngStrap.collapse.ICollapseOptions = {}; - defaults.animation = 'am-flip-x'; + function $collapseConfig($collapseProvider: ngStrap.collapse.ICollapseProvider): void { + const defaults: ngStrap.collapse.ICollapseOptions = {}; + defaults.animation = 'am-flip-x'; - angular.extend($collapseProvider.defaults, defaults); - } + angular.extend($collapseProvider.defaults, defaults); + } } - /////////////////////////////////////////////////////////////////////////// // Dropdown /////////////////////////////////////////////////////////////////////////// namespace dropdownTests { - angular.module('myApp') .config($dropdownConfig); - function $dropdownConfig($dropdownProvider: ngStrap.dropdown.IDropdownProvider):void { - var defaults: ngStrap.dropdown.IDropdownOptions = {}; - defaults.animation = 'am-flip-x'; - defaults.trigger = 'hover'; + function $dropdownConfig($dropdownProvider: ngStrap.dropdown.IDropdownProvider): void { + const defaults: ngStrap.dropdown.IDropdownOptions = {}; + defaults.animation = 'am-flip-x'; + defaults.trigger = 'hover'; - angular.extend($dropdownProvider.defaults, defaults); + angular.extend($dropdownProvider.defaults, defaults); } } - /////////////////////////////////////////////////////////////////////////// // Navbar /////////////////////////////////////////////////////////////////////////// namespace navbarTests { - angular.module('myApp') .config($navbarConfig); - function $navbarConfig($navbarProvider: ngStrap.navbar.INavbarProvider):void { - var defaults: ngStrap.navbar.INavbarOptions = {}; - defaults.activeClass = 'in'; + function $navbarConfig($navbarProvider: ngStrap.navbar.INavbarProvider): void { + const defaults: ngStrap.navbar.INavbarOptions = {}; + defaults.activeClass = 'in'; - angular.extend($navbarProvider.defaults, defaults); + angular.extend($navbarProvider.defaults, defaults); } } - /////////////////////////////////////////////////////////////////////////// // Scrollspy /////////////////////////////////////////////////////////////////////////// namespace scrollspyTests { - angular.module('myApp') .config($scrollspyConfig); - function $scrollspyConfig($scrollspyProvider: ngStrap.scrollspy.IScrollspyProvider):void { - var defaults: ngStrap.scrollspy.IScrollspyOptions = {}; - defaults.offset = 0; - defaults.target = 'my-selector'; + function $scrollspyConfig($scrollspyProvider: ngStrap.scrollspy.IScrollspyProvider): void { + const defaults: ngStrap.scrollspy.IScrollspyOptions = {}; + defaults.offset = 0; + defaults.target = 'my-selector'; - angular.extend($scrollspyProvider.defaults, defaults); + angular.extend($scrollspyProvider.defaults, defaults); } } - /////////////////////////////////////////////////////////////////////////// // Affix /////////////////////////////////////////////////////////////////////////// namespace affixTests { - angular.module('myApp') .config($affixConfig); - function $affixConfig($affixProvider: ngStrap.affix.IAffixProvider):void { - var defaults: ngStrap.affix.IAffixOptions = {}; - defaults.offsetTop = 100; + function $affixConfig($affixProvider: ngStrap.affix.IAffixProvider): void { + const defaults: ngStrap.affix.IAffixOptions = {}; + defaults.offsetTop = 100; - angular.extend($affixProvider.defaults, defaults); + angular.extend($affixProvider.defaults, defaults); } } } diff --git a/types/angular-strap/index.d.ts b/types/angular-strap/index.d.ts index d67c003da8..70ed41a443 100644 --- a/types/angular-strap/index.d.ts +++ b/types/angular-strap/index.d.ts @@ -1,25 +1,20 @@ -// Type definitions for angular-strap v2.3.x +// Type definitions for angular-strap 2.3 // Project: http://mgcrea.github.io/angular-strap/ // Definitions by: Sam Herrmann // Matthias Kannwischer // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 - /// declare namespace mgcrea.ngStrap { - /////////////////////////////////////////////////////////////////////////// // Modal // see http://mgcrea.github.io/angular-strap/#/modals /////////////////////////////////////////////////////////////////////////// namespace modal { - - interface IModalService { - (config?: IModalOptions): IModal; - } + type IModalService = (config?: IModalOptions) => IModal; interface IModalProvider { defaults: IModalOptions; @@ -27,9 +22,9 @@ declare namespace mgcrea.ngStrap { interface IModal { $promise: ng.IPromise; - show: () => void; - hide: () => void; - toggle: () => void; + show(): void; + hide(): void; + toggle(): void; } interface IModalOptions { @@ -53,30 +48,26 @@ declare namespace mgcrea.ngStrap { prefixEvent?: string; id?: string; scope?: ng.IScope; - onShow?: (modal: IModal) => void; - onBeforeShow?: (modal: IModal) => void; - onHide?: (modal: IModal) => void; - onBeforeHide?: (modal: IModal) => void; + onShow?(modal: IModal): void; + onBeforeShow?(modal: IModal): void; + onHide?(modal: IModal): void; + onBeforeHide?(modal: IModal): void; } interface IModalScope extends ng.IScope { - $show: () => void; - $hide: () => void; - $toggle: () => void; + $show(): void; + $hide(): void; + $toggle(): void; } } - /////////////////////////////////////////////////////////////////////////// // Aside // see http://mgcrea.github.io/angular-strap/#/asides /////////////////////////////////////////////////////////////////////////// namespace aside { - - interface IAsideService { - (config?: IAsideOptions): IAside; - } + type IAsideService = (config?: IAsideOptions) => IAside; interface IAsideProvider { defaults: IAsideOptions; @@ -84,9 +75,9 @@ declare namespace mgcrea.ngStrap { interface IAside { $promise: ng.IPromise; - show: () => void; - hide: () => void; - toggle: () => void; + show(): void; + hide(): void; + toggle(): void; } interface IAsideOptions { @@ -105,31 +96,26 @@ declare namespace mgcrea.ngStrap { templateUrl?: string; contentTemplate?: string; scope?: ng.IScope; - onShow?: (aside: IAside) => void; - onBeforeShow?: (aside: IAside) => void; - onHide?: (aside: IAside) => void; - onBeforeHide?: (aside: IAside) => void; + onShow?(aside: IAside): void; + onBeforeShow?(aside: IAside): void; + onHide?(aside: IAside): void; + onBeforeHide?(aside: IAside): void; } interface IAsideScope extends ng.IScope { - $show: () => void; - $hide: () => void; - $toggle: () => void; + $show(): void; + $hide(): void; + $toggle(): void; } } - - /////////////////////////////////////////////////////////////////////////// // Alert // see http://mgcrea.github.io/angular-strap/#/alerts /////////////////////////////////////////////////////////////////////////// namespace alert { - - interface IAlertService { - (config?: IAlertOptions): IAlert; - } + type IAlertService = (config?: IAlertOptions) => IAlert; interface IAlertProvider { defaults: IAlertOptions; @@ -137,9 +123,9 @@ declare namespace mgcrea.ngStrap { interface IAlert { $promise: ng.IPromise; - show: () => void; - hide: () => void; - toggle: () => void; + show(): void; + hide(): void; + toggle(): void; } interface IAlertOptions { @@ -156,30 +142,26 @@ declare namespace mgcrea.ngStrap { templateUrl?: string; duration?: number | boolean; dismissable?: boolean; - onShow?: (alert: IAlert) => void; - onBeforeShow?: (alert: IAlert) => void; - onHide?: (alert: IAlert) => void; - onBeforeHide?: (alert: IAlert) => void; + onShow?(alert: IAlert): void; + onBeforeShow?(alert: IAlert): void; + onHide?(alert: IAlert): void; + onBeforeHide?(alert: IAlert): void; } interface IAlertScope extends ng.IScope { - $show: () => void; - $hide: () => void; - $toggle: () => void; + $show(): void; + $hide(): void; + $toggle(): void; } } - /////////////////////////////////////////////////////////////////////////// // Tooltip // see http://mgcrea.github.io/angular-strap/#/tooltips /////////////////////////////////////////////////////////////////////////// namespace tooltip { - - interface ITooltipService { - (element: ng.IAugmentedJQuery, config?: ITooltipOptions): ITooltip; - } + type ITooltipService = (element: ng.IAugmentedJQuery, config?: ITooltipOptions) => ITooltip; interface ITooltipProvider { defaults: ITooltipOptions; @@ -187,9 +169,9 @@ declare namespace mgcrea.ngStrap { interface ITooltip { $promise: ng.IPromise; - show: () => void; - hide: () => void; - toggle: () => void; + show(): void; + hide(): void; + toggle(): void; } interface ITooltipOptions { @@ -198,7 +180,7 @@ declare namespace mgcrea.ngStrap { trigger?: string; title?: string; html?: boolean; - delay?: number | { show: number; hide: number }; + delay?: number | { show: number; hide: number}; container?: string | boolean; target?: string | ng.IAugmentedJQuery | boolean; template?: string; @@ -206,32 +188,28 @@ declare namespace mgcrea.ngStrap { titleTemplate?: string; prefixEvent?: string; id?: string; - onShow?: (tooltip: ITooltip) => void; - onBeforeShow?: (tooltip: ITooltip) => void; - onHide?: (tooltip: ITooltip) => void; - onBeforeHide?: (tooltip: ITooltip) => void; + onShow?(tooltip: ITooltip): void; + onBeforeShow?(tooltip: ITooltip): void; + onHide?(tooltip: ITooltip): void; + onBeforeHide?(tooltip: ITooltip): void; viewport?: string | { selector: string; padding: string | number }; } interface ITooltipScope extends ng.IScope { - $show: () => void; - $hide: () => void; - $toggle: () => void; - $setEnabled: (isEnabled: boolean) => void; + $show(): void; + $hide(): void; + $toggle(): void; + $setEnabled(isEnabled: boolean): void; } } - /////////////////////////////////////////////////////////////////////////// // Popover // see http://mgcrea.github.io/angular-strap/#/popovers /////////////////////////////////////////////////////////////////////////// namespace popover { - - interface IPopoverService { - (element: ng.IAugmentedJQuery, config?: IPopoverOptions): IPopover; - } + type IPopoverService = (element: ng.IAugmentedJQuery, config?: IPopoverOptions) => IPopover; interface IPopoverProvider { defaults: IPopoverOptions; @@ -239,9 +217,9 @@ declare namespace mgcrea.ngStrap { interface IPopover { $promise: ng.IPromise; - show: () => void; - hide: () => void; - toggle: () => void; + show(): void; + hide(): void; + toggle(): void; } interface IPopoverOptions { @@ -259,32 +237,27 @@ declare namespace mgcrea.ngStrap { contentTemplate?: string; autoClose?: boolean; id?: string; - onShow?: (popover: IPopover) => void; - onBeforeShow?: (popover: IPopover) => void; - onHide?: (popover: IPopover) => void; - onBeforeHide?: (popover: IPopover) => void; + onShow?(popover: IPopover): void; + onBeforeShow?(popover: IPopover): void; + onHide?(popover: IPopover): void; + onBeforeHide?(popover: IPopover): void; viewport?: string | { selector: string; padding: string | number }; } interface IPopoverScope extends ng.IScope { - $show: () => void; - $hide: () => void; - $toggle: () => void; + $show(): void; + $hide(): void; + $toggle(): void; } } - - /////////////////////////////////////////////////////////////////////////// // Typeahead // see http://mgcrea.github.io/angular-strap/#/typeaheads /////////////////////////////////////////////////////////////////////////// namespace typeahead { - - interface ITypeaheadService { - (element: ng.IAugmentedJQuery, controller: any, config?: ITypeaheadOptions): ITypeahead; - } + type ITypeaheadService = (element: ng.IAugmentedJQuery, controller: any, config?: ITypeaheadOptions) => ITypeahead; interface ITypeaheadProvider { defaults: ITypeaheadOptions; @@ -292,9 +265,9 @@ declare namespace mgcrea.ngStrap { interface ITypeahead { $promise: ng.IPromise; - show: () => void; - hide: () => void; - toggle: () => void; + show(): void; + hide(): void; + toggle(): void; } interface ITypeaheadOptions { @@ -312,39 +285,35 @@ declare namespace mgcrea.ngStrap { id?: string; watchOptions?: boolean; trimValue?: boolean; - onShow?: (typeahead: ITypeahead) => void; - onBeforeShow?: (typeahead: ITypeahead) => void; - onHide?: (typeahead: ITypeahead) => void; - onBeforeHide?: (typeahead: ITypeahead) => void; - onSelect?: (typeahead: ITypeahead) => void; + onShow?(typeahead: ITypeahead): void; + onBeforeShow?(typeahead: ITypeahead): void; + onHide?(typeahead: ITypeahead): void; + onBeforeHide?(typeahead: ITypeahead): void; + onSelect?(typeahead: ITypeahead): void; } } - /////////////////////////////////////////////////////////////////////////// // Datepicker // see http://mgcrea.github.io/angular-strap/#/datepickers /////////////////////////////////////////////////////////////////////////// namespace datepicker { - - interface IDatepickerService { - (element: ng.IAugmentedJQuery, controller: any, config?: IDatepickerOptions): IDatepicker; - } + type IDatepickerService = (element: ng.IAugmentedJQuery, controller: any, config?: IDatepickerOptions) => IDatepicker; interface IDatepickerProvider { defaults: IDatepickerOptions; } interface IDatepicker { - update: (date: Date) => void; - updateDisabledDates: (dateRanges: IDatepickerDateRange[]) => void; - select: (dateConstructorArg: string | number | number[], keep: boolean) => void; - setMode: (mode: any) => void; - int: () => void; - destroy: () => void; - show: () => void; - hide: () => void; + update(date: Date): void; + updateDisabledDates(dateRanges: IDatepickerDateRange[]): void; + select(dateConstructorArg: string | number | number[], keep: boolean): void; + setMode(mode: any): void; + int(): void; + destroy(): void; + show(): void; + hide(): void; } interface IDatepickerDateRange { @@ -360,10 +329,10 @@ declare namespace mgcrea.ngStrap { delay?: number | { show: number; hide: number }; container?: string | boolean; template?: string; - onShow?: (datepicker: IDatepicker) => void; - onBeforeShow?: (datepicker: IDatepicker) => void; - onHide?: (datepicker: IDatepicker) => void; - onBeforeHide?: (datepicker: IDatepicker) => void; + onShow?(datepicker: IDatepicker): void; + onBeforeShow?(datepicker: IDatepicker): void; + onHide?(datepicker: IDatepicker): void; + onBeforeHide?(datepicker: IDatepicker): void; dateFormat?: string; modelDateFormat?: string; dateType?: string; @@ -383,24 +352,19 @@ declare namespace mgcrea.ngStrap { } } - /////////////////////////////////////////////////////////////////////////// // Timepicker // see http://mgcrea.github.io/angular-strap/#/timepickers /////////////////////////////////////////////////////////////////////////// namespace timepicker { - - interface ITimepickerService { - (element: ng.IAugmentedJQuery, controller: any, config?: ITimepickerOptions): ITimepicker; - } + type ITimepickerService = (element: ng.IAugmentedJQuery, controller: any, config?: ITimepickerOptions) => ITimepicker; interface ITimepickerProvider { defaults: ITimepickerOptions; } interface ITimepicker { - } interface ITimepickerOptions { @@ -411,10 +375,10 @@ declare namespace mgcrea.ngStrap { delay?: number | { show: number; hide: number; }; container?: string | boolean; template?: string; - onShow?: (timepicker: ITimepicker) => void; - onBeforeShow?: (timepicker: ITimepicker) => void; - onHide?: (timepicker: ITimepicker) => void; - onBeforeHide?: (timepicker: ITimepicker) => void; + onShow?(timepicker: ITimepicker): void; + onBeforeShow?(timepicker: ITimepicker): void; + onHide?(timepicker: ITimepicker): void; + onBeforeHide?(timepicker: ITimepicker): void; timeFormat?: string; modelTimeFormat?: string; timeType?: string; @@ -433,7 +397,6 @@ declare namespace mgcrea.ngStrap { } } - /////////////////////////////////////////////////////////////////////////// // Button // see http://mgcrea.github.io/angular-strap/#/buttons @@ -441,53 +404,49 @@ declare namespace mgcrea.ngStrap { // No definitions for this module - /////////////////////////////////////////////////////////////////////////// // Select // see http://mgcrea.github.io/angular-strap/#/selects /////////////////////////////////////////////////////////////////////////// namespace select { - - interface ISelectService { - (element: ng.IAugmentedJQuery, controller: any, config: ISelectOptions): ISelect; - } + type ISelectService = (element: ng.IAugmentedJQuery, controller: any, config: ISelectOptions) => ISelect; interface ISelectProvider { defaults: ISelectOptions; } interface ISelect { - update: (matches: any) => void; - active: (index: number) => number; - select: (index: number) => void; - show: () => void; - hide: () => void; + update(matches: any): void; + active(index: number): number; + select(index: number): void; + show(): void; + hide(): void; } interface ISelectOptions { - animation?: string; - placement?: string; - trigger?: string; - html?: boolean; - delay?: number | { show: number; hide: number; }; - container?: string | boolean; - template?: string; - toggle?: boolean; - onShow?: (select: ISelect) => void; - onBeforeShow?: (select: ISelect) => void; - onHide?: (select: ISelect) => void; - onBeforeHide?: (select: ISelect) => void; - multiple?: boolean; - allNoneButtons?: boolean; - allText?: string; - noneText?: string; - maxLength?: number; - maxLengthHtml?: string; - sort?: boolean; - placeholder?: string; - iconCheckmark?: string; - id?: string; + animation?: string; + placement?: string; + trigger?: string; + html?: boolean; + delay?: number | { show: number; hide: number; }; + container?: string | boolean; + template?: string; + toggle?: boolean; + onShow?(select: ISelect): void; + onBeforeShow?(select: ISelect): void; + onHide?(select: ISelect): void; + onBeforeHide?(select: ISelect): void; + multiple?: boolean; + allNoneButtons?: boolean; + allText?: string; + noneText?: string; + maxLength?: number; + maxLengthHtml?: string; + sort?: boolean; + placeholder?: string; + iconCheckmark?: string; + id?: string; } } @@ -497,7 +456,6 @@ declare namespace mgcrea.ngStrap { /////////////////////////////////////////////////////////////////////////// namespace tab { - interface ITabProvider { defaults: ITabOptions; } @@ -515,14 +473,12 @@ declare namespace mgcrea.ngStrap { } } - /////////////////////////////////////////////////////////////////////////// // Collapses // see http://mgcrea.github.io/angular-strap/#/collapses /////////////////////////////////////////////////////////////////////////// namespace collapse { - interface ICollapseProvider { defaults: ICollapseOptions; } @@ -536,52 +492,46 @@ declare namespace mgcrea.ngStrap { } } - /////////////////////////////////////////////////////////////////////////// // Dropdowsn // see http://mgcrea.github.io/angular-strap/#/dropdowns /////////////////////////////////////////////////////////////////////////// namespace dropdown { - interface IDropdownProvider { defaults: IDropdownOptions; } - interface IDropdownService { - (element: ng.IAugmentedJQuery, config: IDropdownOptions): IDropdown; - } + type IDropdownService = (element: ng.IAugmentedJQuery, config: IDropdownOptions) => IDropdown; interface IDropdown { - show: () => void; - hide: () => void; - destroy: () => void; + show(): void; + hide(): void; + destroy(): void; } interface IDropdownOptions { - animation?: string; - placement?: string; - trigger?: string; - html?: boolean; - delay?: number | { show: number; hide: number; }; - container?: string | boolean; - template?: string; - templateUrl?: string; - onShow?: (dropdown: IDropdown) => void; - onBeforeShow?: (dropdown: IDropdown) => void; - onHide?: (dropdown: IDropdown) => void; - onBeforeHide?: (dropdown: IDropdown) => void; + animation?: string; + placement?: string; + trigger?: string; + html?: boolean; + delay?: number | { show: number; hide: number; }; + container?: string | boolean; + template?: string; + templateUrl?: string; + onShow?(dropdown: IDropdown): void; + onBeforeShow?(dropdown: IDropdown): void; + onHide?(dropdown: IDropdown): void; + onBeforeHide?(dropdown: IDropdown): void; } } - /////////////////////////////////////////////////////////////////////////// // Navbar // see http://mgcrea.github.io/angular-strap/#/navbars /////////////////////////////////////////////////////////////////////////// namespace navbar { - interface INavbarProvider { defaults: INavbarOptions; } @@ -596,27 +546,23 @@ declare namespace mgcrea.ngStrap { } } - /////////////////////////////////////////////////////////////////////////// // Scrollspy // see http://mgcrea.github.io/angular-strap/#/scrollspy /////////////////////////////////////////////////////////////////////////// namespace scrollspy { - interface IScrollspyProvider { defaults: IScrollspyOptions; } - interface IScrollspyService { - (element: ng.IAugmentedJQuery, options: IScrollspyOptions): IScrollspy; - } + type IScrollspyService = (element: ng.IAugmentedJQuery, options: IScrollspyOptions) => IScrollspy; interface IScrollspy { - checkOffsets: () => void; - trackElement: (target: any, source: any) => void; - untrackElement: (target: any, source: any) => void; - activate: (index: number) => void; + checkOffsets(): void; + trackElement(target: any, source: any): void; + untrackElement(target: any, source: any): void; + activate(index: number): void; } interface IScrollspyOptions { @@ -625,27 +571,23 @@ declare namespace mgcrea.ngStrap { } } - /////////////////////////////////////////////////////////////////////////// // Affix // see http://mgcrea.github.io/angular-strap/#/affix /////////////////////////////////////////////////////////////////////////// namespace affix { - interface IAffixProvider { defaults: IAffixOptions; } - interface IAffixService { - (element: ng.IAugmentedJQuery, options: IAffixOptions): IAffix; - } + type IAffixService = (element: ng.IAugmentedJQuery, options: IAffixOptions) => IAffix; interface IAffix { - init: () => void; - destroy: () => void; - checkPositionWithEventLoop: () => void; - checkPosition: () => void; + init(): void; + destroy(): void; + checkPositionWithEventLoop(): void; + checkPosition(): void; } interface IAffixOptions { diff --git a/types/angular-strap/tslint.json b/types/angular-strap/tslint.json new file mode 100644 index 0000000000..fc261a36d6 --- /dev/null +++ b/types/angular-strap/tslint.json @@ -0,0 +1,8 @@ +{ + "extends": "dtslint/dt.json" , + "rules": { //TODO + "interface-name": [true, "always-prefix"], + "no-empty-interface" : false, + "no-namespace" : false + } +} \ No newline at end of file From 43f6ea36af3785eec1c048cce96d7ee59e20ff1d Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 14 Sep 2017 09:55:57 -0600 Subject: [PATCH 030/486] Remove moved file --- xrm/index.d.ts | 3279 ------------------------------------------------ 1 file changed, 3279 deletions(-) delete mode 100644 xrm/index.d.ts diff --git a/xrm/index.d.ts b/xrm/index.d.ts deleted file mode 100644 index 67c5a8e778..0000000000 --- a/xrm/index.d.ts +++ /dev/null @@ -1,3279 +0,0 @@ -// Type definitions for Microsoft Dynamics xRM API 8.2 -// Project: http://www.microsoft.com/en-us/download/details.aspx?id=44567 -// Definitions by: David Berry -// Matt Ngan -// Markus Mauch -// Daryl LaBar -// Tully H -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.1 - -declare var Xrm: Xrm.XrmStatic; -declare function GetGlobalContext(): Xrm.Context; - -interface Window -{ - Xrm: Xrm.XrmStatic; - GetGlobalContext(): Xrm.Context; -} - -declare namespace Xrm -{ - /** - * Static xRM object. - */ - export interface XrmStatic - { - /** - * Provides a namespace container for the context, data and ui objects. - */ - Page: { - /** - * Provides methods to retrieve information specific to an organization, a user, or parameters passed to a page. - */ - context: Context; - - /** - * Provides methods to work with the form. - */ - data: Data; - - /** - * Contains properties and methods to retrieve information about the user interface as well as collections for several subcomponents of the form. - */ - ui: Ui; - - /** - * Gets all attributes. - * - * @return An array of attributes. - */ - getAttribute(): Page.Attribute[]; - - /** - * Gets an attribute matching attributeName. - * - * @tparam T An Attribute type. - * @param {string} attributeName Name of the attribute. - * - * @return The attribute. - */ - getAttribute( attributeName: string ): T; - - /** - * Gets an attribute matching attributeName. - * - * @param {string} attributeName Name of the attribute. - * - * @return The attribute. - */ - getAttribute( attributeName: string ): Page.Attribute; - - /** - * Gets an attribute by index. - * - * @param {number} index The attribute index. - * - * @return The attribute. - */ - getAttribute( index: number ): Page.Attribute; - - /** - * Gets an attribute. - * - * @param {Collection.MatchingDelegate{Attribute}} delegateFunction A matching delegate function - * - * @return An array of attribute. - */ - getAttribute( delegateFunction: Collection.MatchingDelegate ): Page.Attribute[]; - - /** - * Gets all controls. - * - * @return An array of controls. - */ - getControl(): Page.Control[]; - - /** - * Gets a control matching controlName. - * - * @tparam T A Control type - * @param {string} controlName Name of the control. - * - * @return The control. - */ - getControl( controlName: string ): T; - - /** - * Gets a control matching controlName. - * - * @param {string} controlName Name of the control. - * - * @return The control. - */ - getControl( controlName: string ): Page.Control; - - /** - * Gets a control by index. - * - * @tparam T A Control type - * @param {number} index The control index. - * - * @return The control. - */ - getControl( index: number ): T; - - /** - * Gets a control by index. - * - * @param {number} index The control index. - * - * @return The control. - */ - getControl( index: number ): Page.Control; - - /** - * Gets a control. - * - * @param {Collection.MatchingDelegate{Control}} delegateFunction A matching delegate function. - * - * @return An array of control. - */ - getControl( delegateFunction: Collection.MatchingDelegate ): Page.Control[]; - }; - - /** - * Provides a container for useful functions not directly related to the current page. - */ - Utility: { - /** - * Displays an alert dialog, with an "OK" button. - * - * @param {string} message The message. - * @param {function()} onCloseCallback The "OK" callback. - */ - alertDialog( message: string, onCloseCallback: () => void ): void; - - /** - * Displays a confirmation dialog, with "OK" and "Cancel" buttons. - * - * @param {string} message The message. - * @param {function()} yesCloseCallback The "OK" callback. - * @param {function()} noCloseCallback The "Cancel" callback. - */ - confirmDialog( message: string, yesCloseCallback: () => void, noCloseCallback: () => void ): void; - - /** - * Query if 'entityType' is an Activity entity. - * - * @param {string} entityType Type of the entity. - * - * @return true if the entity is an Activity, false if not. - */ - isActivityType( entityType: string ): boolean; - - /** - * Opens quick create. - * - * @param {string} entityLogicalName The logical name of the entity to create. - * @param {Page.LookupValue} createFromEntity (Optional) Designates a record that will provide default values - * based on mapped attribute values. - * @param {OpenParameters} parameters (Optional) A dictionary object that passes extra query string - * parameters to the form. Invalid query string parameters will cause an - * error. - * @return {Async.XrmPromise} Returns an asynchronous promise. - */ - openQuickCreate( entityLogicalName: string, createFromEntity?: Page.LookupValue, parameters?: Utility.OpenParameters ): - Async.XrmPromise; - - /** - * Opens an entity form. - * - * @param {string} name The entity's logical name. - * @param {string} id (Optional) The unique identifier for the record. - * @param {FormParameters} parameters (Optional) A dictionary object that passes extra query string parameters to the form. - * @param {WindowOptions} windowOptions (Optional) Options for controlling the window. - */ - openEntityForm( name: string, id?: string, parameters?: Utility.FormOpenParameters, windowOptions?: Utility.WindowOptions ): void; - - /** - * Opens an HTML Web Resource in a new browser window. - * - * @param {string} webResourceName Name of the HTML web resource. Can be used to pass URL - * parameters. See Remarks. - * @param {string} webResourceData (Optional) Data to pass into the Web Resource's data parameter. - * It is advised to use encodeURIcomponent() to encode the value. - * @param {number} width (Optional) The width of the new window. - * @param {number} height (Optional) The height of the new window. - * - * @return A Window reference, containing the opened Web Resource. - * - * @remarks This function will not work with Microsoft Dynamics CRM for tablets. - * Valid WebResource URL Parameters: typename - * type - * id - * orgname - * userlcid - * data (identical to this method's webResourceData parameter) - * formid - */ - openWebResource( webResourceName: string, webResourceData?: string, width?: number, height?: number ): Window; - }; - - /** - * Provides methods to create and manage records in the mobile clients (for phones tablets). - */ - Mobile: Mobile; - - /** - * Provides methods to display a web page in the side pane of web client. - * - * @see {@link https://msdn.microsoft.com/en-us/library/mt790281.aspx} for details. - */ - Panel: { - /** - * Displays the web page represented by a URL in the static area in the side pane, which appears on all pages in the web client. - * - * @param {string} url URL of the page to be loaded in the side pane static area. - * @param {string} url Title of the side pane static area. - * - * @remarks This method is only supported for the web client. - */ - LoadPanel(url: string, title: string): void; - }; - } - - /** - * Client Types for Xrm.Page.context.getClient(). - */ - export type Client = "Web" | "Outlook" | "Mobile"; - - /** - * Client States for Xrm.Page.context.getClientState(). - */ - export type ClientState = "Online" | "Offline"; - - /** - * Themes for Xrm.Page.context.getCurrentTheme(). - */ - export type Theme = "default" | "Office12Blue" | "Office14Silver"; - - /** - * Interface for the client context. - */ - export interface ClientContext - { - /** - * Returns a value to indicate which client the script is executing in. - * - * @return The client, as either "Web", "Outlook", or "Mobile" - */ - getClient(): Client; - - /** - * Gets client's current state. - * - * @return The client state, as either "Online" or "Offline" - */ - getClientState(): ClientState; - } - - /** - * Interface for the xRM application context. - */ - export interface Context - { - /** - * The client's context instance. - */ - client: ClientContext; - - /** - * Gets client's base URL for Dynamics CRM - * - * @return The client's base URL - * - * @remarks For Dynamics CRM On-Premises: http(s)://server/org - * For Dynamics CRM Online: https://org.crm.dynamics.com - * For Dynamics CRM for Outlook (Offline): http://localhost:2525 - */ - getClientUrl(): string; - - /** - * Gets current styling theme. - * - * @return The name of the current theme, as either "default", "Office12Blue", or "Office14Silver" - * - * @remarks This function does not work with Dynamics CRM for tablets. - */ - getCurrentTheme(): Theme; - - /** - * Gets whether automatic save is enabled. - * - * @return true if automatic saving is enabled, otherwise false. - */ - getIsAutoSaveEnabled(): boolean; - - /** - * Gets organization's LCID (language code). - * - * @return The organization language code. - * - * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} - */ - getOrgLcid(): number; - - /** - * Gets organization's unique name. - * - * @return The organization's unique name. - * - * @remarks This value can be found on the Developer Resources page within Dynamics CRM - */ - getOrgUniqueName(): string; - - /** - * Gets query string parameters. - * - * @return The query string parameters, in a dictionary object representing name and value pairs. - */ - getQueryStringParameters(): { [index: string]: any }; - - /** - * Returns the difference between the local time and Coordinated Universal Time (UTC). - * - * @return The time zone offset, in minutes. - */ - getTimeZoneOffsetMinutes(): number; - - /** - * Gets user's unique identifier. - * - * @return The user's identifier in Guid format. - * - * @remarks Example: "{B05EC7CE-5D51-DF11-97E0-00155DB232D0}" - */ - getUserId(): string; - - /** - * Gets user's LCID (language code). - * - * @return The user's language code. - * - * @see {@link http://msdn.microsoft.com/en-us/library/ms912047(WinEmbedded.10).aspx|Microsoft Locale ID Values} - */ - getUserLcid(): number; - - /** - * Gets the name of the current user. - * - * @return The user's name. - */ - getUserName(): string; - - /** - * Gets all user security roles. - * - * @return An array of user role identifiers, in Guid format. - * - * @remarks Example: ["cf4cc7ce-5d51-df11-97e0-00155db232d0"] - */ - getUserRoles(): string[]; - - /** - * Prefixes the current organization's unique name to a string; typically a URL path. - * - * @param {string} sPath Local pathname of the resource. - * - * @return A path string with the organization name. - * - * @remarks Format: "/"+ OrgName + sPath - */ - prependOrgName( sPath: string ): string; - } - - /** - * Defines save options to control how appointment, recurring appointment, or service activity records are processed. - * - * @see {@link https://msdn.microsoft.com/en-us/library/dn481607.aspx#Anchor_2} for details. - */ - export interface SaveOptions - { - /** - * Indicates whether to use the Book or Reschedule messages rather than the Create or Update messages. - * Applicable to appointment, recurring appointment, or service activity records. - */ - UseSchedulingEngine?: boolean; - } - - /** - * Interface for the Xrm.Page.data object. - */ - export interface Data - { - /** - * Asynchronously refreshes data on the form, without reloading the page. - * - * @param {boolean} save true to save the record, after the refresh. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - */ - refresh( save: boolean ): Async.XrmPromise; - - /** - * Asynchronously saves the record. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - */ - save(): Async.XrmPromise; - - /** - * Asynchronously saves the record with the option to set callback functions to be executed after the save operation is completed. - * - * @param {saveOptions} saveOptions Options to control how appointment, recurring appointment, or service activity records are processed. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - */ - save( saveOptions: SaveOptions ): Async.XrmPromise; - - /** - * The record context of the form. - */ - entity: Page.Entity; - - /** - * The process API for Xrm.Page.data. - * - * @remarks This member may be undefined when Process Flows are not used by the current entity. - */ - process: Page.data.ProcessManager; - } - - /** - * Interface for the Xrm.Page.ui object. - */ - export interface Ui - { - /** - * Displays a form level notification. Any number of notifications can be displayed and will remain until removed using clearFormNotification. - * The height of the notification area is limited so each new message will be added to the top. - * - * @param {string} message The text of the notification message. - * @param {Page.ui.FormNotificationLevel} level The level of the notification which defines how the message will be displayed, such as the icon. - * @param {string} uniqueId Unique identifier for the notification which is used with clearFormNotification to remove the notification. - * - * @return true if it succeeds, otherwise false. - * - * @remarks Values for level are: ERROR Notification will use the system error icon. - * WARNING Notification will use the system warning icon. - * INFO Notification will use the system info icon. - */ - setFormNotification( message: string, level: Page.ui.FormNotificationLevel, uniqueId: string ): boolean; - - /** - * Clears the form notification described by uniqueId. - * - * @param {string} uniqueId Unique identifier. - * - * @return True if it succeeds, otherwise false. - */ - clearFormNotification( uniqueId: string ): boolean; - - /** - * Closes the form. - */ - close(): void; - - /** - * Gets form type. - * - * @return The form type. - * - * @remarks Values returned are: 0 Undefined - * 1 Create - * 2 Update - * 3 Read Only - * 4 Disabled - * 6 Bulk Edit - * Deprecated values are 5 (Quick Create), and 11 (Read Optimized) - */ - getFormType(): XrmEnum.FormType; - - /** - * Gets view port height. - * - * @return The view port height, in pixels. - * - * @remarks This method does not work with Microsoft Dynamics CRM for tablets. - */ - getViewPortHeight(): number; - - /** - * Gets view port width. - * - * @return The view port width, in pixels. - * - * @remarks This method does not work with Microsoft Dynamics CRM for tablets. - */ - getViewPortWidth(): number; - - /** - * Re-evaluates the ribbon's configured EnableRules. - * - * @remarks This method does not work with Microsoft Dynamics CRM for tablets. - */ - refreshRibbon(): void; - - /** - * The business process flow API, used to interact with the business process flow control in a form. - */ - process: Page.ui.ProcessManager; - - /** - * A reference to the collection of controls on the form. - */ - controls: Collection.ItemCollection; - - /** - * The form selector API. - * - * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. - */ - formSelector: Page.FormSelector; - - /** - * The navigation API. - * - * @remarks This API does not exist with Microsoft Dynamics CRM for tablets. - */ - navigation: Page.Navigation; - - /** - * A reference to the collection of tabs on the form. - */ - tabs: Collection.ItemCollection; - - /** - * A collection of all the quick view controls on a form using the new form rendering engine (also called "turbo forms"). - */ - quickForms: Collection.ItemCollection; - } - - /** - * Interface for methods to create and manage records in the mobile clients (for phones tablets). - */ - export interface Mobile - { - /** - * Provides methods to create and manage records in the mobile clients while working in the offline mode. - * - * @see {@link https://msdn.microsoft.com/en-us/library/mt787123.aspx} for details. - */ - offline: MobileOffline; - } - - /** - * Interface for the Mobile.offline methods to create and manage records in the mobile clients while working in the offline mode. - * - * @see {@link https://msdn.microsoft.com/en-us/library/mt787123.aspx} for details. - */ - export interface MobileOffline - { - /** - * Returns whether an entity is offline enabled. - * - * @param {string} entityType The logical name of the entity. - * - * @return {boolean} True if the entity is offline enabled; otherwise False. - */ - isOfflineEnabled( entityType: string ): boolean; - - /** - * Creates an entity record in mobile clients while working in the offline mode. - * - * @param {string} entityType The logical name of the entity. - * @param {Object} data A dictionary object containing key : value pairs for the record to create. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - * - * @remarks You cannot create intersect and activity party entities. - * Only the following attribute types are supported in offline mode: - * BigInt, Boolean, Customer, DateTime, Decimal, Double, EntityName - * Integer, Lookup, Memo, Money, Owner, Picklist, String, State - * Status, UniqueIdentifier - */ - createRecord( entityType: string, data: { [attributeName: string]: any } ): Async.XrmPromise; - - /** - * Retrieves an entity record in mobile clients while working in the offline mode. - * - * @param {string} entityType The logical name of the entity. - * @param {string} id GUID of the record to retrieve. - * @param {string} options (Optional) OData system query options to retrieve your data. Supports $select and $expand - * Example: ?$select=name&$expand=primarycontactid($select=contactid,fullname) - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - * - * @remarks Only $select option can be specified within $expand. - * Only the following attribute types are supported in offline mode: - * BigInt, Boolean, Customer, DateTime, Decimal, Double, EntityName - * Integer, Lookup, Memo, Money, Owner, Picklist, String, State - * Status, UniqueIdentifier - */ - retrieveRecord( entityType: string, id: string, options: string ): Async.XrmPromise; - - /** - * Retrieves a collection of entity records in mobile clients while working in the offline mode. - * - * @param {string} entityType The logical name of the entity. - * @param {string} options (Optional) The logical name of the enti - * @param {string} maxPageSize (Optional) A positive number to indicates the number of entity records to be returned per page. - * If you do not specify this parameter, the default value is passed as 5000. - * If the number of records being retrieved is more than maxPageSize, an @odata.nextLink property - * will be returned, and you can use the value of the @odata.nextLink property with a new GET - * request to return next set of records. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - * - * @remarks A maximum of 5000 related records can be retrieved when using $expand. - * Only $select option can be specified within $expand. - * $skip query option is not supported. - * Only the following attribute types are supported in offline mode: - * BigInt, Boolean, Customer, DateTime, Decimal, Double, EntityName - * Integer, Lookup, Memo, Money, Owner, Picklist, String, State - * Status, UniqueIdentifier - */ - retrieveMultipleRecords( entityType: string, options: string, maxPageSize: number ): Async.XrmPromise; - - /** - * Updates an entity record in mobile clients while working in the offline mode. - * - * @param {string} entityType The logical name of the entity. - * @param {string} id GUID of the record to update. - * @param {Object} data A dictionary object containing key : value pairs for the record to update. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - * - * @remarks You cannot update intersect and activity party entities. - * Only the following attribute types are supported in offline mode: - * BigInt, Boolean, Customer, DateTime, Decimal, Double, EntityName - * Integer, Lookup, Memo, Money, Owner, Picklist, String, State - * Status, UniqueIdentifier - */ - updateRecord( entityType: string, id: string, data: { [attributeName: string]: any } ): Async.XrmPromise; - - /** - * Deletes an entity record in mobile clients while working in the offline mode. - * - * @param {string} entityType The logical name of the entity. - * @param {string} id GUID of the record to delete. - * - * @return {Async.XrmPromise} Returns an asynchronous promise. - * - * @remarks You cannot delete intersect and activity party entities. - */ - deleteRecord( entityType: string, id: string ): Async.XrmPromise; - } - - /** - * A definition module for asynchronous interface declarations. - */ - export module Async - { - /** - * Called when the operation is successful. - */ - export type SuccessCallbackDelegate = () => void; - - /** - * Called when the operation fails. - * - * @param {ErrorCallbackObject} error The error object. - */ - export type ErrorCallbackDelegate = ( error: ErrorCallbackObject ) => void; - - /** - * Called when the Xrm.Utility.openQuickCreate operation is successful and a new record has been created. - * - * @param {OpenQuickCreateSuccessCallbackObject} record An object which contains a lookup value which identifies the record which has been created. - * - * @see {Xrm.Utility.openQuickCreate} - */ - export type QuickCreateSuccessCallbackDelegate = ( record: OpenQuickCreateSuccessCallbackObject ) => void; - - /** - * Called when the offline operation is successful. - * - * @param {OfflineOperationSuccessCallbackObject} record The record returned from the operation. - * - * @see {Xrm.Mobile.offline} - */ - export type OfflineOperationSuccessCallbackDelegate = ( record: OfflineOperationSuccessCallbackObject ) => void; - - /** - * Called when the offline retrieve multiple operation is successful. - * - * @param {OfflineRetrieveMultipleSuccessCallbackDelegate} resultSet The dictionary of records retrieved from the operation. - * - * @see {Xrm.Mobile.offline.retrieveMultipleRecords} - */ - export type OfflineRetrieveMultipleSuccessCallbackDelegate = (resultSet: Array<{ [key: string]: any }>) => void; - - /** - * Called when the operation fails. - * - * @param {OfflineErrorCallbackObject} error The error object. - * - * @see {Xrm.Mobile.offline} - */ - export type OfflineErrorCallbackDelegate = (error: OfflineErrorCallbackObject) => void; - - /** - * Object passed to ErrorCallbackDelegate. - */ - export interface ErrorCallbackObject - { - /** - * The error code. - */ - errorCode: number; - - /** - * An error message describing the issue. - */ - message: string; - } - - /** - * Object passed to QuickCreateSuccessCallbackDelegate. - */ - export interface OpenQuickCreateSuccessCallbackObject - { - /** - * A lookup value which identifies the record which has been created. - */ - savedEntityReference: Page.LookupValue; - } - - /** - * Object passed to OfflineOperationSuccessCallbackDelegate; - */ - export interface OfflineOperationSuccessCallbackObject - { - /** - * GUID of the record; - */ - id: string; - - /** - * Logical name of the entity. - */ - logicalName: string; - } - - /** - * Object passed to OfflineErrorCallbackDelegate. - */ - export interface OfflineErrorCallbackObject extends ErrorCallbackObject - { - /** - * An internal error message that might contain additional details about the issue. - */ - debugMessage: string; - } - - /** - * Interface for asynchronous promises used in Xrm.Page.data and Xrm.Utility.openQuickCreate. - * - * @tparam TSuccessCallback Generic success callback parameter. - * @tparam TErrorCallback Generic error callback parameter. - */ - export interface XrmPromise - { - /** - * A basic 'then' promise. - * - * @param {SuccessCallbackDelegate} successCallback The success callback. - * @param {ErrorCallbackDelegate} errorCallback The error callback. - */ - then( successCallback: TSuccessCallback, errorCallback: TErrorCallback ): void; - } - } - - /** - * A definition module for collection interface declarations. - */ - export module Collection - { - /** - * Interface for a matching delegate. - * - * @tparam T Generic type parameter. - */ - export interface MatchingDelegate - { - /** - * Called for each item in an array - * - * @param {T} item The item. - * @param {number} index Zero-based index of the item array. - * - * @return true if the item matches, false if it does not. - */ - ( item: T, index?: number ): boolean; - } - - /** - * Interface for iterative delegate. - * - * @tparam T Generic type parameter. - */ - export interface IterativeDelegate - { - /** - * Called for each item in an array - * - * @param {T} item The item. - * @param {number} index Zero-based index of the item array. - */ - ( item: T, index?: number ): void; - } - - /** - * Interface for an item collection. - * - * @tparam T Generic type parameter. - */ - export interface ItemCollection - { - /** - * Applies an operation to all items in this collection. - * - * @param {IterativeDelegate{T}} delegate An iterative delegate function - */ - forEach( delegate: IterativeDelegate ): void; - - /** - * Gets. - * - * @param {MatchingDelegate{T}} delegate A matching delegate function - * - * @return A T[] whose members have been validated by delegate. - */ - get( delegate: MatchingDelegate ): T[]; - - /** - * Gets the item given by the index. - * - * @param {number} itemNumber The item number to get. - * - * @return The T in the itemNumber-th place. - */ - get( itemNumber: number ): T; - - /** - * Gets the item given by the key. - * - * @param {string} itemName The item name to get. - * - * @return The T matching the key itemName. - * - * @see {@link Xrm.Page.Control.getName()} for Control-naming schemes. - */ - get( itemName: string ): T; - - /** - * Gets the entire array of T. - * - * @return A T[]. - */ - get(): T[]; - - /** - * Gets the length of the collection. - * - * @return The length. - */ - getLength(): number; - } - } - - /** - * The Xrm.Page API - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. - */ - export module Page - { - /** - * Requirement Level for Xrm.Page.Attribute.getRequiredLevel() and Xrm.Page.Attribute.setRequiredLevel(). - */ - export type RequirementLevel = "none" | "recommended" | "required"; - - /** - * Save Modes for Xrm.Page.Entity.save(). - */ - export type SaveMode = "saveandclose" | "saveandnew"; - - /** - * Status for Xrm.Page.Stage.getStatus(). - */ - export type Status = "active" | "inactive"; - - /** - * Submit Mode for Xrm.Page.Attribute.getSubmitMode() and Xrm.Page.Attribute.setSubmitMode(). - */ - export type SubmitMode = "always" | "dirty" | "never"; - - /** - * Control type for Xrm.Page.ui.QuickForm.getControlType(). - */ - export type ControlQuickFormType = "quickform"; - - /** - * Control types for Xrm.Page.Control.getControlType(). - */ - export type ControlType = "standard" | "iframe" | "lookup" | "optionset" | "subgrid" | "webresource" | "notes" | "timercontrol" | "kbsearch" | ControlQuickFormType; - - /** - * Date attribute formats for Xrm.Page.Attribute.getFormat(), used by DateAttribute. - */ - export type DateAttributeFormat = "date" | "datetime"; - - /** - * Integer attribute formats for Xrm.Page.Attribute.getFormat(), used by NumberAttribute. - */ - export type IntegerAttributeFormat = "duration" | "none"; - - /** - * OptionSet attribute formats for Xrm.Page.Attribute.getFormat(), used by OptionSetAttribute. - */ - export type OptionSetAttributeFormat = "language" | "timezone"; - - /** - * String attribute formats for Xrm.Page.Attribute.getFormat(), used by StringAttribute. - */ - export type StringAttributeFormat = "email" | "phone" | "text" | "textarea" | "tickersymbol" | "url"; - - /** - * Attribute types for Xrm.ui.ProcessMonitor Xrm.Page.Attribute.setDisplayState(). - */ - export type AttributeType = "boolean" | "datetime" | "decimal" | "double" | "integer" | "lookup" | "memo" | "money" | "optionset" | "string"; - - /** - * Attribute formats for Xrm.Page.Attribute.getFormat(). - */ - export type AttributeFormat = DateAttributeFormat | IntegerAttributeFormat | OptionSetAttributeFormat | StringAttributeFormat; - - /** - * Interface for a CRM Business Process Flow instance. - */ - export interface Process - { - /** - * Returns the unique identifier of the process. - * - * @return The identifier for this process, in GUID format. - * - * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". - */ - getId(): string; - - /** - * Returns the name of the process. - * - * @return The name. - */ - getName(): string; - - /** - * Returns an collection of stages in the process. - * - * @return The stages. - */ - getStages(): Collection.ItemCollection; - - /** - * Returns a boolean value to indicate if the process is rendered. - * - * @return true if the process is rendered, false if not. - */ - isRendered(): boolean; - } - - /** - * Interface for CRM Business Process Flow stages. - */ - export interface Stage - { - /** - * Returns an object with a getValue method which will return the integer value of the business process flow - * category. - * - * @return The stage category. - */ - getCategory(): { getValue(): XrmEnum.StageCategory }; - - /** - * Returns the logical name of the entity associated with the stage. - * - * @return The entity name. - */ - getEntityName(): string; - - /** - * Returns the unique identifier of the stage. - * - * @return The identifier of the Stage, in GUID format. - * - * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". - */ - getId(): string; - - /** - * Returns the name of the stage. - * - * @return The name. - */ - getName(): string; - - /** - * Returns the status of the stage. - * - * @return The status. - * - * @remarks This method will return either "active" or "inactive". - */ - getStatus(): Status; - - /** - * Returns a collection of steps in the stage. - * - * @return An array of Step. - */ - getSteps(): Step[]; - } - - export interface Step - { - /** - * Returns the logical name of the attribute associated to the step. - * - * @return The attribute. - * - * @remarks Some steps don’t contain an attribute value. - */ - getAttribute(): string; - - /** - * Returns the name of the step. - * - * @return The name. - */ - getName(): string; - - /** - * Returns whether the step is required in the business process flow. - * - * @return true if required, false if not. - * - * @remarks Returns true if the step is marked as required in the Business Process Flow editor; otherwise, false. - * There is no connection between this value and the values you can change in the Xrm.Page.data.entity - * attribute RequiredLevel methods. - */ - isRequired(): boolean; - } - - /** - * Interface for the event context. - */ - export interface EventContext - { - /** - * Gets the Xrm context. - * - * @return The Xrm context. - */ - getContext(): Context; - - /** - * Gets the handler's depth, which is the order in which the handler is executed. - * - * @return The depth, a 0-based index. - */ - getDepth(): number; - - /** - * Gets save-event arguments. - * - * @return The event arguments. - * - * @remarks Returns null for all but the "save" event. - */ - getEventArgs(): SaveEventArguments; - - /** - * Gets a reference to the object for which event occurred. - * - * @return The event source. - */ - getEventSource(): Attribute | Control | Entity; - - /** - * Gets the shared variable with the specified key. - * - * @tparam T Generic type parameter. - * @param {string} key The key. - * - * @return The shared variable. - * - * @remarks Used to pass values between handlers of an event. - */ - getSharedVariable( key: string ): T; - - /** - * Sets a shared variable. - * - * @tparam T Generic type parameter. - * @param {string} key The key. - * @param {T} value The value. - * - * @remarks Used to pass values between handlers of an event. - */ - setSharedVariable( key: string, value: T ): void; - } - - /** - * Interface for a context-sensitive handler. - */ - export interface ContextSensitiveHandler - { - /** - * @param {EventContext} context The context. - */ - ( context: EventContext ): void; - } - - /** - * Interface for UI elements with labels. - */ - export interface UiLabelElement - { - /** - * Gets the label. - * - * @return The label. - */ - getLabel(): string; - - /** - * Sets the label. - * - * @param {string} label The label. - */ - setLabel( label: string ): void; - } - - /** - * Interface for UI elements which can have the visibility value read. - */ - export interface UiCanGetVisibleElement - { - /** - * Gets the visibility state. - * - * @return true if the tab is visible, otherwise false. - */ - getVisible(): boolean; - } - - /** - * Interface for UI elements which can have the visibility value updated. - */ - export interface UiCanSetVisibleElement - { - /** - * Sets the visibility state. - * - * @param {boolean} visible true to show, false to hide. - */ - setVisible( visible: boolean ): void; - } - - /** - * Base interface for standard UI elements. - */ - export interface UiStandardElement extends UiCanGetVisibleElement, UiLabelElement - { - /** - * Sets the visibility state. - * - * @param {boolean} visible true to show, false to hide. - */ - setVisible( visible: boolean ): void; - } - - /** - * Interface for focusable UI elements. - */ - export interface UiFocusable - { - /** - * Sets focus on the element. - */ - setFocus(): void; - } - - /** - * Interface for controls which methods provide immediate feedback or take actions as user types in a control. - * Contains methods which can be used to perform data validations in a control even before the user commits (saves) the value in a form. - */ - export interface UiKeyPressable - { - /** - * Use this to add a function as an event handler for the keypress event so that the function is called when you type a character in the specific text or number field. - * For a sample JavaScript code that uses the addOnKeyPress method to configure the auto-completion experience, see Sample: Auto-complete in CRM controls. - * - * @param {ContextSensitiveHandler} handler The function reference. - */ - addOnKeyPress( handler: ContextSensitiveHandler ): void; - - /** - * Use this to manually fire an event handler that you created for a specific text or number field to be executed on the keypress event. - */ - fireOnKeyPress(): void; - - /** - * Use this to remove an event handler for a text or number field that you added using addOnKeyPress. - * - * Remarks: If an anonymous function is set using addOnKeyPress, it can’t be removed using this method. - * @param {ContextSensitiveHandler} handler The function reference. - */ - removeOnKeyPress( handler: ContextSensitiveHandler ): void; - } - - /** - * Interface for Result value of AutoCompleteResultSet - */ - export interface AutoCompleteResult - { - /** - * The Identifier - */ - id: string | number; - - /** - * Url of the icon to display - */ - icon?: string; - - /** - * Display value(s) for this auto-complete option - */ - fields: string[]; - } - - /** - * Interface for command of AutoCompleteResultSet. This is displayed at the bottom of the auto complete view - */ - export interface AutoCompleteCommand - { - /** - * The Identifier - */ - id: string; - - /** - * Url of the icon to display - */ - icon?: string; - - /** - * Label to display at the bottom of the auto complete view - */ - label: string; - - /** - * Action to perform when user clicks on label - */ - action(): void; - } - - /** - * Interface for showAutoComplete argument - */ - export interface AutoCompleteResultSet - { - /** - * Results to show - */ - results: AutoCompleteResult[]; - - /** - * Command to show/execute at the bottom of the results displayed - */ - commands?: AutoCompleteCommand; - } - - /** - * Interface for a Lookup value. - */ - export interface LookupValue - { - /** - * The identifier. - */ - id: string; - - /** - * The name - */ - name?: string; - - /** - * Type of the entity. - */ - entityType: string; - } - - /** - * Interface for an OptionSet value. - */ - export interface OptionSetValue - { - /** - * The label text. - */ - text: string; - - /** - * The value, as a number - */ - value: number; - } - - /** - * Interface for a privilege. - */ - export interface Privilege - { - /** - * True if the user can read. - */ - canRead: boolean; - - /** - * True if the user can update. - */ - canUpdate: boolean; - - /** - * True if the user can create. - */ - canCreate: boolean; - } - - /** - * Interface for an Entity attribute. - */ - export interface Attribute - { - /** - * Adds a handler to be called when the attribute's value is changed. - * - * @param {ContextSensitiveHandler} handler The function reference. - */ - addOnChange( handler: ContextSensitiveHandler ): void; - - /** - * Fire all "on change" event handlers. - */ - fireOnChange(): void; - - /** - * Gets attribute type. - * - * @return The attribute's type name. - * - * @remarks Values returned are: boolean - * datetime - * decimal - * double - * integer - * lookup - * memo - * money - * optionset - * string - */ - getAttributeType(): string; - - /** - * Gets the attribute format. - * - * @return The format of the attribute. - * - * @see {@link getAttributeType()} - * - * @remarks Values returned are: date (datetime) - * datetime (datetime) - * duration (integer) - * email (string) - * language (optionset) - * none (integer) - * phone (string) - * text (string) - * textarea (string) - * tickersymbol (string) - * timezone (optionset) - * url (string) - */ - getFormat(): AttributeFormat; - - /** - * Gets a boolean value indicating whether this Attribute has unsaved changes. - * - * @return true if there are unsaved changes, otherwise false. - */ - getIsDirty(): boolean; - - /** - * Gets the logical name of the attribute. - * - * @return The logical name. - */ - getName(): string; - - /** - * Gets a reference to the record context of this attribute. - * - * @return The parent record context. - */ - getParent(): Entity; - - /** - * Gets the current level of requirement for the attribute. - * - * @return The required level, as either "none", "required", or "recommended" - */ - getRequiredLevel(): RequirementLevel; - - /** - * Gets current submit mode for the attribute. - * - * @return The submit mode, as either "always", "never", or "dirty" - * - * @remarks The default value is "dirty" - */ - getSubmitMode(): SubmitMode; - - /** - * Gets the current user's privileges for the attribute. - * - * @return The user privileges. - */ - getUserPrivilege(): Privilege; - - /** - * Removes the handler from the "on change" event. - * - * @param {ContextSensitiveHandler} handler The handler. - */ - removeOnChange( handler: ContextSensitiveHandler ): void; - - /** - * Sets the required level. - * - * @param {string} requirementLevel The requirement level, as either "none", "required", or "recommended" - */ - setRequiredLevel( requirementLevel: RequirementLevel ): void; - - /** - * Sets the submit mode. - * - * @param {string} submitMode The submit mode, as either "always", "never", or "dirty". - * - * @remarks The default value is "dirty" - */ - setSubmitMode( submitMode: SubmitMode ): void; - - /** - * A collection of all the controls on the form that interface with this attribute. - */ - controls: Collection.ItemCollection; - - /** - * Gets the value. - * - * @return The value. - */ - getValue(): any; - - /** - * Sets the value. - * - * @param {any} value The value. - */ - setValue( value: any ): void; - } - - /** - * Interface for a Number attribute. - * - * @sa Attribute - */ - export interface NumberAttribute extends Attribute - { - /** - * Gets the attribute format. - * - * @return The format of the attribute. - * - * @remarks Values returned are: duration - * none - */ - getFormat(): IntegerAttributeFormat; - - /** - * Gets the maximum value allowed. - * - * @return The maximum value allowed. - */ - getMax(): number; - - /** - * Gets the minimum value allowed. - * - * @return The minimum value allowed. - */ - getMin(): number; - - /** - * Gets the attribute's configured precision. - * - * @return The total number of allowed decimal places. - */ - getPrecision(): number; - - /** - * Gets the value. - * - * @return The value. - */ - getValue(): number; - - /** - * Sets the value. - * - * @param {number} value The value. - * - * @remarks Attributes on Quick Create Forms will not save values set with this method. - */ - setValue( value: number ): void; - - /** - * A collection of all the controls on the form that interface with this attribute. - */ - controls: Collection.ItemCollection; - } - - /** - * Interface for a String attribute. - * - * @sa Attribute - */ - export interface StringAttribute extends Attribute - { - /** - * Gets the attribute format. - * - * @return The format of the attribute. - * - * @remarks Values returned are: email - * phone - * text - * textarea - * tickersymbol - * url - */ - getFormat(): StringAttributeFormat; - - /** - * Gets maximum length allowed. - * - * @return The maximum length allowed. - * - * @remarks The email form's "Description" attribute does not have the this method. - */ - getMaxLength(): number; - - /** - * Gets the value. - * - * @return The value. - */ - getValue(): string; - - /** - * Sets the value. - * - * @param {string} value The value. - * - * @remarks A String field with the {@link Attribute.getFormat|email} format enforces email - * address formatting. Attributes on Quick Create Forms will not save values set - * with this method. - */ - setValue( value: string ): void; - - /** - * A collection of all the controls on the form that interface with this attribute. - */ - controls: Collection.ItemCollection; - } - - /** - * Common interface for enumeration attributes (OptionSet and Boolean). - * - * @sa Attribute - */ - export interface EnumAttribute extends Attribute - { - /** - * Gets the initial value of the attribute. - * - * @return The initial value. - * - * @remarks Valid for OptionSet and boolean attribute types - */ - getInitialValue(): number | boolean; - } - - /** - * Interface for a Boolean attribute. - * - * @sa EnumAttribute - */ - export interface BooleanAttribute extends EnumAttribute - { - /** - * Gets the value. - * - * @return true if it succeeds, false if it fails. - */ - getValue(): boolean; - - /** - * Sets the value. - * - * @param {boolean} value The value. - * - * @remarks Attributes on Quick Create Forms will not save values set with this method. - */ - setValue( value: boolean ): void; - } - - /** - * Interface for a Date attribute. - * - * @sa Attribute - */ - export interface DateAttribute extends Attribute - { - /** - * Gets the attribute format. - * - * @return The format of the attribute. - * - * @remarks Values returned are: date - * datetime - */ - getFormat(): DateAttributeFormat; - - /** - * Gets the value. - * - * @return The value. - */ - getValue(): Date; - - /** - * Sets the value. - * - * @param {Date} value The value. - * - * @remarks Attributes on Quick Create Forms will not save values set with this method. - */ - setValue( value: Date ): void; - - /** - * A collection of all the controls on the form that interface with this attribute. - */ - controls: Collection.ItemCollection; - } - - /** - * Interface an OptionSet attribute. - * - * @sa EnumAttribute - */ - export interface OptionSetAttribute extends EnumAttribute - { - /** - * Gets the attribute format. - * - * @return The format of the attribute. - * - * @remarks Values returned are: language - * timezone - */ - getFormat(): OptionSetAttributeFormat; - - /** - * Gets the option matching a value. - * - * @param {number} value The enumeration value of the option desired. - * - * @return The option. - */ - getOption( value: number ): OptionSetValue; - - /** - * Gets the option matching a label. - * - * @param {string} label The label of the option desired. - * - * @return The option. - */ - getOption( label: string ): OptionSetValue; - - /** - * Gets all of the options. - * - * @return An array of options. - */ - getOptions(): OptionSetValue[]; - - /** - * Gets selected option. - * - * @return The selected option. - */ - getSelectedOption(): OptionSetValue; - - /** - * Gets the label of the currently selected option. - * - * @return The current value's label. - */ - getText(): string; - - /** - * Gets the value. - * - * @return The value. - */ - getValue(): number; - - /** - * Sets the value. - * - * @param {number} value The value. - * - * @remarks The getOptions() method returns option values as strings. You must use parseInt - * to convert them to numbers before you can use those values to set the value of an - * OptionSet attribute. Attributes on Quick Create Forms will not save values set - * with this method. - */ - setValue( value: number ): void; - - /** - * A collection of all the controls on the form that interface with this attribute. - */ - controls: Collection.ItemCollection; - } - - /** - * Interface a Lookup attribute. - * - * @sa Attribute - */ - export interface LookupAttribute extends Attribute - { - /** - * Gets a boolean value indicating whether the Lookup is a multi-value PartyList. - * - * @return true the attribute is a PartyList, otherwise false. - */ - getIsPartyList(): boolean; - - /** - * Gets the value. - * - * @return An array of LookupValue. - */ - getValue(): LookupValue[]; - - /** - * Sets the value. - * - * @param {LookupValue[]} value The value. - * - * @remarks Attributes on Quick Create Forms will not save values set with this method. - */ - setValue( value: LookupValue[] ): void; - - /** - * A collection of all the controls on the form that interface with this attribute. - */ - controls: Collection.ItemCollection; - } - - /** - * Interface for the form's record context, Xrm.Page.data.entity - */ - export interface Entity - { - /** - * Adds a handler to be called when the record is saved. - * - * @param {ContextSensitiveHandler} handler The handler. - */ - addOnSave( handler: ContextSensitiveHandler ): void; - - /** - * Gets an serialized-XML string representing data that will be passed to the server upon saving - * the record. - * - * @return The XML in string format. - * - * @remarks This function does not work with Microsoft Dynamics CRM for tablets. Example: - * "Contoso55555425 - * 555-1234". - */ - getDataXml(): string; - - /** - * Gets entity's logical name. - * - * @return The logical name. - */ - getEntityName(): string; - - /** - * Gets the record's unique identifier. - * - * @return The identifier, in Guid format. - * - * @remarks Example: "{825CB223-A651-DF11-AA8B-00155DBA3804}". - */ - getId(): string; - - /** - * Gets a boolean value indicating whether the record has unsaved changes. - * - * @return true if there are unsaved changes, otherwise false. - */ - getIsDirty(): boolean; - - /** - * Gets the record's primary attribute value. - * - * @return The primary attribute value. - * - * @remarks The value for this attribute is used when links to the record are displayed. - */ - getPrimaryAttributeValue(): string; - - /** - * Removes the handler from the "on save" event. - * - * @param {ContextSensitiveHandler} handler The handler. - */ - removeOnSave( handler: ContextSensitiveHandler ): void; - - /** - * Saves the record. - * - * @remarks When using quick create forms in the web application the saveandnew option is not - * applied. It will always work as if saveandclose were used. Quick create forms in - * Microsoft Dynamics CRM for tablets will apply the saveandnew behavior. - */ - save(): void; - - /** - * Saves the record with the given save mode. - * - * @param {string} saveMode (Optional) the save mode to save, as either "saveandclose" or - * "saveandnew". - */ - save( saveMode: SaveMode ): void; - - /** - * The collection of attributes for the record. - */ - attributes: Collection.ItemCollection; - } - - /** - * Interface for save event arguments. - */ - export interface SaveEventArguments - { - /** - * Gets save mode, as an integer. - * - * @return The save mode. - * - * @remarks Values returned are: 1 Save - * 2 Save and Close - * 59 Save and New - * 70 AutoSave (Where enabled; can be used with an OnSave handler - * to conditionally disable auto-saving) - * 58 Save as Completed (Activities) - * 5 Deactivate - * 6 Reactivate - * 47 Assign (All user- or team-owned entities) - * 7 Send (Email) - * 16 Qualify (Lead) - * 15 Disqualify (Lead) - */ - getSaveMode(): XrmEnum.SaveMode; - - /** - * Returns a boolean value to indicate if the record's save has been prevented. - * - * @return true if saving is prevented, otherwise false. - */ - isDefaultPrevented(): boolean; - - /** - * Prevents the save operation from being submitted to the server. - * - * @remarks All remaining "on save" handlers will continue execution. - */ - preventDefault(): void; - } - - /** - * Module for the Xrm.Page.data API. - */ - export module data - { - /** - * Interface for the Xrm.Page.data.process API. - */ - export interface ProcessManager - { - /** - * Returns a Process object representing the active process. - * - * @return current active process. - */ - getActiveProcess(): Process; - - /** - * Set a Process as the active process. - * - * @param {string} processId The Id of the process to make the active process. - * @param {function} callbackFunction (Optional) a function to call when the operation is complete. - */ - setActiveProcess( processId: string, callbackFunction?: ProcessCallbackDelegate ): void; - - /** - * Returns a Stage object representing the active stage. - * - * @return current active stage. - */ - getActiveStage(): Stage; - - /** - * Set a stage as the active stage. - * - * @param {string} stageId the Id of the stage to make the active stage. - * @param {function} callbackFunction (Optional) a function to call when the operation is complete. - */ - setActiveStage( stageId: string, callbackFunction?: ProcessCallbackDelegate ): void; - - /** - * Use this method to get a collection of stages currently in the active path with methods to interact with the - * stages displayed in the business process flow control. The active path represents stages currently rendered in - * the process control based on the branching rules and current data in the record. - * - * @return A collection of all completed stages, the currently active stage, and the predicted set of future stages - * based on satisfied conditions in the branching rule. This may be a subset of the stages returned with - * Xrm.Page.data.process.getActiveProcess because it will only include those stages which represent a valid - * transition from the current stage based on branching that has occurred in the process. - */ - getActivePath(): Collection.ItemCollection; - - /** - * Use this method to asynchronously retrieve the enabled business process flows that the user can switch to for an - * entity. - * - * @param {Function} callbackFunction The callback function must accept a parameter that contains an object with - * dictionary properties where the name of the property is the Id of the - * business process flow and the value of the property is the name of the - * business process flow. - * - * The enabled processes are filtered according to the user’s privileges. The - * list of enabled processes is the same ones a user can see in the UI if they - * want to change the process manually. - */ - getEnabledProcesses( callbackFunction: ( enabledProcesses: ProcessDictionary ) => void ): void; - - /** - * Use this method to get the currently selected stage. - * - * @return The currently selected stage. - */ - getSelectedStage(): Stage; - - /** - * Use this to add a function as an event handler for the OnStageChange event so that it will be called when the - * business process flow stage changes. - * @param {ContextSensitiveHandler} handler The function will be added to the bottom of the event - * handler pipeline. The execution context is automatically - * set to be the first parameter passed to the event handler. - * - * Use a reference to a named function rather than an - * anonymous function if you may later want to remove the - * event handler. - */ - addOnStageChange( handler: ContextSensitiveHandler ): void; - - /** - * Use this to add a function as an event handler for the OnStageSelected event so that it will be called - * when a business process flow stage is selected. - * - * @param {ContextSensitiveHandler} handler The function will be added to the bottom of the event - * handler pipeline. The execution context is automatically - * set to be the first parameter passed to the event handler. - * - * Use a reference to a named function rather than an - * anonymous function if you may later want to remove the - * event handler. - */ - addOnStageSelected(handler: ContextSensitiveHandler): void; - - /** - * Use this to remove a function as an event handler for the OnStageChange event. - * - * @param {ContextSensitiveHandler} handler If an anonymous function is set using the addOnStageChange method it - * cannot be removed using this method. - */ - removeOnStageChange(handler: ContextSensitiveHandler): void; - - /** - * Use this to remove a function as an event handler for the OnStageChange event. - * - * @param {ContextSensitiveHandler} handler If an anonymous function is set using the addOnStageChange method it - * cannot be removed using this method. - */ - removeOnStageSelected( handler: ContextSensitiveHandler ): void; - - /** - * Progresses to the next stage. - * - * @param {ProcessCallbackDelegate} callbackFunction (Optional) A function to call when the operation is - * complete. - */ - moveNext( callbackFunction?: ProcessCallbackDelegate ): void; - - /** - * Moves to the previous stage. - * - * @param {ProcessCallbackDelegate} callbackFunction (Optional) A function to call when the operation is - * complete. - */ - movePrevious( callbackFunction?: ProcessCallbackDelegate ): void; - } - - /** - * Called when process change methods have completed. - * - * @param {string} status The result of the process change operation. - * - * @remarks Values returned are: success (The operation succeeded.) - * crossEntity (The previous stage is for a different entity.) - * beginning (The active stage is the first stage of the active path.) - * invalid (The operation failed because the selected stage isn’t the same - * as the active stage.) - * unreachable (The stage exists on a different path.) - */ - export type ProcessCallbackDelegate = ( status: string ) => void; - - /** - * Represents a key-value pair, where the key is the Process Flow's ID, and the value is the name thereof. - */ - export interface ProcessDictionary { [index: string]: string; } - } - - /** - * Interface for Xrm.Page.ui controls. - * - * @sa UiElement - */ - export interface Control extends UiLabelElement, UiCanGetVisibleElement - { - /** - * Gets the controls type. - * - * @return The control type. - * - * @remarks Values returned are: standard - * iframe - * lookup - * optionset - * subgrid - * webresource - * notes - * timercontrol - * kbsearch (CRM Online Only, use parature.d.ts) - * quickform (see ui.QuickForm) - * customcontrol: . (A custom control for mobile phone and tablet clients). - * customsubgrid: . (A custom dataset control for mobile phone and tablet clients). - */ - getControlType(): ControlType | string; - - /** - * Gets the name of the control on the form. - * - * @return The name of the control. - * - * @remarks The name assigned to a control is not determined until the form loads. Changes to - * the form may change the name assigned to a given control. - * When you use the control getName method the name of the first control will be the - * same as the name of the attribute. The second instance of a control for that - * attribute will be "1". The pattern +N - * will continue for each additional control added to the form for a specific - * attribute. When a form displays a business process flow control in the header, - * additional controls will be added for each attribute that is displayed in the - * business process flow. These controls have a unique name like the following: - * header_process_. - */ - getName(): string; - - /** - * Gets a reference to the Section parent of the control. - * - * @return The parent Section. - */ - getParent(): Section; - } - - /** - * Interface for a standard control. - * - * @sa Control - */ - export interface StandardControl extends Control, UiStandardElement, UiFocusable - { - /** - * Clears the notification identified by uniqueId. - * - * @param {string} uniqueId (Optional) Unique identifier. - * - * @return true if it succeeds, false if it fails. - * - * @remarks If the uniqueId parameter is not used, the current notification shown will be removed. - */ - clearNotification( uniqueId?: string ): boolean; - - /** - * Gets a boolean value, indicating whether the control is disabled. - * - * @return true if it is disabled, otherwise false. - */ - getDisabled(): boolean; - - /** - * Sets the state of the control to either enabled, or disabled. - * - * @param {boolean} disabled true to disable, false to enable. - */ - setDisabled( disabled: boolean ): void; - - /** - * Sets a control-local notification message. - * - * @param {string} message The message. - * @param {string} uniqueId Unique identifier. - * - * @return true if it succeeds, false if it fails. - * - * @remarks When this method is used on Microsoft Dynamics CRM for tablets a red "X" icon - * appears next to the control. Tapping on the icon will display the message. - */ - setNotification( message: string, uniqueId: string ): boolean; - - /** - * Gets the control's bound attribute. - * - * @tparam T An Attribute type. - * - * @return The attribute. - */ - getAttribute(): T; - - /** - * Gets the control's bound attribute. - * - * @return The attribute. - */ - getAttribute(): Attribute; - } - - /** - * Interface for Auto Lookup Control. - * This is not an Entity Lookup, but a control that supports AutoComplete / KeyPress Events (Text or Number) - * - * @remarks This interface is not supported for CRM mobile clients (phones or tablets) and the interactive service hub. It is only available for Updated entities. - * - * @sa StandardControl - */ - export interface AutoLookupControl extends StandardControl, UiKeyPressable - { - /** - * Gets the latest value in a control as the user types characters in a specific text or number field. - * This method helps you to build interactive experiences by validating data and alerting users as they type characters in a control. - * The getValue method is different from the attribute getValue method because the control method retrieves the value from the control - * as the user is typing in the control as opposed to the attribute getValue method that retrieves the value after the user commits (saves) the field. - */ - getValue(): string; - - /** - * Hides the auto-completion drop-down list configured for a specific text field - */ - hideAutoComplete(): void; - - /** - * Shows upt to 10 matching strings in a drop-down list as users press keys to type charactrer in a specific text field. - * On selecting an item in the drop-down list, the value in the text field changes to the selected item, the drop-down list disappears, and the OnChange event for the text field is invoked - * @param resultSet - */ - showAutoComplete(resultSet: AutoCompleteResultSet): void; - } - - /** - * Interface for a String control. - * - * @sa StandardControl - */ - export interface StringControl extends AutoLookupControl - { - /** - * Gets the control's bound attribute. - * - * @return The attribute. - */ - getAttribute(): StringAttribute; - } - - /** - * Interface for a Number control. - * - * @sa StandardControl - */ - export interface NumberControl extends AutoLookupControl - { - /** - * Gets the control's bound attribute. - * - * @return The attribute. - */ - getAttribute(): NumberAttribute; - } - - /** - * Interface for a Date control. - * - * @sa StandardControl - */ - export interface DateControl extends StandardControl - { - /** - * Gets the control's bound attribute. - * - * @return The attribute. - */ - getAttribute(): DateAttribute; - - /** - * Gets the status of the time-of-day component of the Date control. - * - * @return true if the time is shown, otherwise false. - */ - getShowTime(): boolean; - - /** - * Sets the visibility of the time component of the Date control. - * - * @param {boolean} showTimeValue true to show, false to hide the time value. - */ - setShowTime( showTimeValue: boolean ): void; - } - - /** - * Interface for a Lookup control. - * - * @sa StandardControl - */ - export interface LookupControl extends StandardControl - { - /** - * Adds a handler to the "pre search" event of the Lookup control. - * - * @param {Function} handler The handler. - */ - addPreSearch( handler: ContextSensitiveHandler ): void; - - /** - * Adds an additional custom filter to the lookup, with the "AND" filter operator. - * Can only be used within a "pre search" event handler - * - * @sa addPreSearch - * - * @param {string} filter Specifies the filter, as a serialized FetchXML - * "filter" node. - * @param {string} entityLogicalName (Optional) The logical name of the entity. - * - * @remarks If entityLogicalName is not specified, the filter will be applied to all entities - * valid for the Lookup control. - * Example filter: - * - * - */ - addCustomFilter( filter: string, entityLogicalName?: string ): void; - - /** - * Adds a custom view for the Lookup dialog. - * - * @param {string} viewId Unique identifier for the view, in Guid format. - * @param {string} entityName Name of the entity. - * @param {string} viewDisplayName Name of the view to display. - * @param {string} fetchXml The FetchXML query for the view's contents, serialized as a string. - * @param {string} layoutXml The Layout XML, serialized as a string. - * @param {boolean} isDefault true, to treat this view as default. - * - * @remarks Cannot be used on "Owner" Lookup controls. - * The viewId is never saved to CRM, but must be unique across available views. Generating - * a new value can be accomplished with a {@link http://www.guidgen.com/|Guid generator}. - * Example viewId value: "{00000000-0000-0000-0000-000000000001}" - * Layout XML Reference: {@link http://msdn.microsoft.com/en-us/library/gg334522.aspx} - */ - addCustomView( viewId: string, entityName: string, viewDisplayName: string, fetchXml: string, layoutXml: string, isDefault: boolean ): void; - - /** - * Gets the control's bound attribute. - * - * @return The attribute. - */ - getAttribute(): LookupAttribute; - - /** - * Gets the unique identifier of the default view. - * - * @return The default view, in Guid format. - * - * @remarks Example: "{00000000-0000-0000-0000-000000000000}" - */ - getDefaultView(): string; - - /** - * Removes the handler from the "pre search" event of the Lookup control. - * - * @param {Function} handler The handler. - */ - removePreSearch( handler: () => void ): void; - - /** - * Sets the Lookup's default view. - * - * @param {string} viewGuid Unique identifier for the view. - * - * @remarks Example viewGuid value: "{00000000-0000-0000-0000-000000000000}" - */ - setDefaultView( viewGuid: string ): void; - } - - /** - * Interface for an OptionSet control. - * - * @sa StandardControl - */ - export interface OptionSetControl extends StandardControl - { - /** - * Adds an option. - * - * @param {OptionSetValue} option The option. - * @param {number} index (Optional) zero-based index of the option. - * - * @remarks This method does not check that the values within the options you add are valid. - * If index is not provided, the new option will be added to the end of the list. - */ - addOption( option: OptionSetValue, index?: number ): void; - - /** - * Clears all options. - */ - clearOptions(): void; - - /** - * Gets the control's bound attribute. - * - * @return The attribute. - */ - getAttribute(): OptionSetAttribute; - - /** - * Removes the option matching the value. - * - * @param {number} value The value. - */ - removeOption( value: number ): void; - } - - /** - * Interface for a CRM grid control. - * - * @sa Control - */ - export interface GridControl extends Control - { - /** - * Use this method to add event handlers to the GridControl's OnLoad event. - * - * @param {Function} handler The event handler. - */ - addOnLoad( handler: () => void ): void; - - /** - * This method returns context information about the GridControl. - * - * @return The context type. - */ - getContextType(): XrmEnum.GridControlContext; - - /** - * Use this method to get the logical name of the entity data displayed in the grid. - * - * @return The entity name. - */ - getEntityName(): string; - - /** - * Use this method to get access to the Grid available in the GridControl. - * - * @return The grid. - */ - getGrid(): ui.Grid; - - /** - * Use this method to get access to the ViewSelector available for the GridControl when it is configured to display views. - * - * @return The view selector. - */ - getViewSelector(): ui.ViewSelector; - - /** - * Refreshes the sub grid. - * - * @remarks Not available during the "on load" event of the form. - */ - refresh(): void; - - /** - * Use this method to remove event handlers from the GridControl's OnLoad event. - * - * @param {Function} handler The handler. - */ - removeOnLoad( handler: () => void ): void; - } - - /** - * Interface for a framed control, which is either a Web Resource or an Iframe. - * - * @sa Control - * - * @remarks An Iframe control provides additional methods, so use {@link IframeControl} where - * appropriate. Silverlight controls should use {@link SilverlightControl}. - */ - export interface FramedControl extends Control - { - /** - * Gets the DOM element containing the control. - * - * @return The container object. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - getObject(): HTMLIFrameElement; - - /** - * Gets the URL value of the control. - * - * @return The source URL. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - getSrc(): string; - - /** - * Sets the URL value of the control. - * - * @param {string} src The source URL. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - setSrc( src: string ): void; - } - - /** - * Interface for an Iframe control. - * - * @sa FramedControl - */ - export interface IframeControl extends FramedControl, UiCanSetVisibleElement - { - /** - * Gets initial URL defined for the Iframe. - * - * @return The initial URL. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - getInitialUrl(): string; - } - - /** - * Interface for a Silverlight control. - * - * @sa Control - */ - export interface SilverlightControl extends Control - { - /** - * Gets the query string value passed to Silverlight. - * - * @return The data. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - getData(): string; - - /** - * Sets the query string value passed to Silverlight. - * - * @param {string} data The data. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - setData( data: string ): void; - - /** - * Gets the DOM element containing the control. - * - * @return The container object. - * - * @remarks Unavailable for Microsoft Dynamics CRM for tablets. - */ - getObject(): HTMLObjectElement; - } - - /** - * Interface for a form tab. - * - * @sa UiElement - * @sa UiFocusable - */ - export interface Tab extends UiStandardElement, UiFocusable - { - /** - * Gets display state of the tab. - * - * @return The display state, as either "expanded" or "collapsed" - */ - getDisplayState(): ui.DisplayState; - - /** - * Gets the name of the tab. - * - * @return The name. - */ - getName(): string; - - /** - * Gets a reference to the Xrm.Page.ui parent of the tab. - * - * @return The parent. - */ - getParent(): Ui; - - /** - * Sets display state of the tab. - * - * @param {string} displayState Display state of the tab, as either "expanded" or "collapsed" - */ - setDisplayState(displayState: ui.DisplayState ): void; - - /** - * A reference to the collection of form sections within this tab. - */ - sections: Collection.ItemCollection
; - } - - /** - * Interface for a form section. - * - * @sa UiElement - */ - export interface Section extends UiStandardElement - { - /** - * Gets the name of the section. - * - * @return The name. - */ - getName(): string; - - /** - * Gets a reference to the Xrm.Page.Tab parent of this item. - * - * @return The parent. - */ - getParent(): Tab; - - /** - * A reference to the collection of controls within this tab. - */ - controls: Collection.ItemCollection; - } - - /** - * Module for Xrm.Page.ui API. - */ - export module ui - { - /** - * Form Notification Levels for Xrm.Ui.setFormNotification(). - */ - export type FormNotificationLevel = "ERROR" | "INFO" | "WARNING"; - - /** - * Display States for Xrm.ui.ProcessMonitor.setDisplayState(). - */ - export type DisplayState = "collapsed" | "expanded"; - - /** - * Interface for Xrm.Page.ui.process API - */ - export interface ProcessManager - { - /** - * Sets display state of the process flow control. - * - * @param {string} displayState Display state of the process flow control, as either "expanded" or "collapsed" - */ - setDisplayState( displayState: ui.DisplayState ): void; - - /** - * Sets the visibility state. - * - * @param {boolean} visible true to show, false to hide. - */ - setVisible( visible: boolean ): void; - } - - /** - * Interface for a grid. Use Grid methods to access information about data in the grid. Grid is returned by the - * GridControl.getGrid method. - */ - export interface Grid - { - /** - * Returns a collection of every GridRow in the Grid. - * - * @return The rows. - */ - getRows(): Collection.ItemCollection; - - /** - * Returns a collection of every selected GridRow in the Grid. - * - * @return The selected rows. - */ - getSelectedRows(): Collection.ItemCollection; - - /** - * Returns the total number of records in the Grid. - * - * @return The total record count. - */ - getTotalRecordCount(): number; - } - - /** - * Interface for a grid row. Use the GridRow.getData method to access the GridRowData. A collection of GridRow is - * returned by Grid.getRows and Grid.getSelectedRows methods. - */ - export interface GridRow - { - /** - * Returns the GridRowData for the GridRow. - * - * @return The data. - */ - getData(): GridRowData; - } - - /** - * Interface for grid row data. Use the GridRowData.getEntity method to access the GridEntity. GridRowData is - * returned by the GridRow.getData method. - */ - export interface GridRowData - { - /** - * Returns the GridEntity for the GridRowData. - * - * @return The entity. - */ - getEntity(): GridEntity; - } - - /** - * Interface for a grid entity. Use the GridEntity methods to access data about the specific records in the rows. - * GridEntity is returned by the GridRowData.getEntity method. - */ - export interface GridEntity - { - /** - * Returns the logical name for the record in the row. - * - * @return The entity name. - */ - getEntityName(): string; - - /** - * Returns a LookupValue that references this record. - * - * @return The entity reference. - */ - getEntityReference(): LookupValue; - - /** - * Returns the id for the record in the row. - * - * @return The identifier of the GridEntity, in GUID format. - * - * @remarks Example return: "{00000000-0000-0000-0000-000000000000}" - */ - getId(): string; - - /** - * Returns the primary attribute value for the record in the row. (Commonly the name.) - * - * @return The primary attribute value. - */ - getPrimaryAttributeValue(): string; - } - - /** - * Interface for the view selector. Use the ViewSelector methods to get or set information about the view selector - * of the grid control. - */ - export interface ViewSelector - { - /** - * Use this method to get a reference to the current view. - * - * @return The current view. - */ - getCurrentView(): ViewSelectorItem; - - /** - * Use this method to determine whether the view selector is visible. - * - * @return true if visible, false if not. - */ - isVisible(): boolean; - - /** - * Use this method to set the current view. - * - * @param {ViewSelectorItem} viewSelectorItem The view selector item. - */ - setCurrentView( viewSelectorItem: ViewSelectorItem ): void; - } - - /** - * Interface for a view selector item. This object contains data that identifies a view. Use this as a parameter to - * the ViewSelector.setCurrentView method. - */ - export interface ViewSelectorItem - { - /** - * Returns a LookupValue that references this view. - * - * @return The entity reference. - */ - getEntityReference(): LookupValue; - } - - /** - * Interface for a quick view control instance on a form. - * - * @see {@link https://msdn.microsoft.com/en-us/library/mt736908.aspx#bkmk_isLoaded} for details. - */ - export interface QuickForm extends Control, UiLabelElement, UiCanGetVisibleElement - { - /** - * Gets the constituent controls in a quick view control. - * - * @return An array of controls. - * - * @remarks Constituent controls in a quick view control are read only. - */ - getControl(): Page.Control[]; - - /** - * Gets the constituent controls in a quick view control. - * - * @tparam T A Control type - * @param {string} controlName Name of the control. - * - * @return The control. - * - * @remarks Constituent controls in a quick view control are read only. - */ - getControl( controlName: string ): T; - - /** - * Gets the constituent controls in a quick view control. - * - * @param {string} controlName Name of the control. - * - * @return The control. - * - * @remarks Constituent controls in a quick view control are read only. - */ - getControl( controlName: string ): Page.Control; - - /** - * Gets a control by index. - * - * @tparam T A Control type - * @param {number} index The control index. - * - * @return The control. - * - * @remarks Constituent controls in a quick view control are read only. - */ - getControl( index: number ): T; - - /** - * Gets a control by index. - * - * @param {number} index The control index. - * - * @return The control. - * - * @remarks Constituent controls in a quick view control are read only. - */ - getControl( index: number ): Page.Control; - - /** - * Gets the controls type. - * - * @return Returns a string value that categorizes quick view controls. - */ - getControlType(): ControlQuickFormType; - - /** - * Returns whether the data binding for the constituent controls in a quick view control is complete. - * - * @return True is the data binding for a constituent control is complete, otherwise false. - * because the quick view form that the control is bound to may not have loaded completely. - * As a result, using the getAttribute or any data-related methods on a constituent control might not work. - * The isLoaded method for the quick view control helps determine the data binding status for constituent controls in a quick view control. - * - * @remarks The data binding for the constituent controls in a quick view control may not be complete during the main form OnLoad event - */ - isLoaded(): boolean; - - /** - * Refreshes the data displayed in a quick view control. - */ - refresh(): void; - } - } - - /** - * Interface for a navigation item. - * - * @sa UiElement - * @sa UiFocusable - */ - export interface NavigationItem extends UiStandardElement, UiFocusable - { - /** - * Gets the name of the item. - * - * @return The identifier. - */ - getId(): string; - } - - /** - * Interface for Xrm.Page.ui.navigation. - */ - export interface Navigation - { - /** - * A reference to the collection of available navigation items. - */ - items: Collection.ItemCollection; - } - - /** - * Interface for an entity's form selector item. - */ - export interface FormItem - { - /** - * Gets the unique identifier of the form. - * - * @return The identifier, in Guid format. - */ - getId(): string; - - /** - * Gets the label for the form. - * - * @return The label. - */ - getLabel(): string; - - /** - * Navigates the user to this form. - */ - navigate(): void; - } - - /** - * Interface for the form selector API. - */ - export interface FormSelector - { - /** - * Gets current form. - * - * @return The current item. - * - * @remarks When only one form is available this method will return null. - */ - getCurrentItem(): FormItem; - - /** - * A reference to the collection of available forms. - */ - items: Collection.ItemCollection; - } - } - - /** - * An definition module for URL-based, CRM component parameters. - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - */ - export module Url - { - /** - * Command Bar Display options for Xrm.Url.FormOpenParameters.cmdbar, Xrm.Url.ViewOpenParameters.cmdbar, and Xrm.Utility.FormOpenParameters.cmdbar. - */ - - export type CmdBarDisplay = "true" | "false"; - /** - * Navigation Bar Display options for Xrm.Url.FormOpenParameters.navbar, Xrm.Url.ViewOpenParameters.navbar, and Xrm.Utility.FormOpenParameters.navbar. - */ - export type NavBarDisplay = "entity" | "off" | "on"; - - /** - * Report Open Action options for Xrm.Url.ReportOpenParameters.actions. - */ - export type ReportAction = "filter" | "run"; - - /** - * Interface for defining parameters on a request to open a form with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: - * "&key=value". - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - * - * @remarks A member for "pagetype" is not provided. The value "entityrecord" is required in - * the URL, for forms. Example: "pagetype=entityrecord" - */ - export interface FormOpenParameters - { - /** - * The logical name of the entity. - */ - etn: string; - - /** - * Additional parameters can be provided to the request. This can only be used to provide - * default field values for the form, or pass data to custom parameters that have been - * customized for the form. See example below for setting the selected form. - * - * @remarks Example: encodeURIComponent( "formid={8c9f3e6f-7839-e211-831e-00155db7d98f}" ); - */ - extraqs?: string; - - /** - * Controls whether the command bar is displayed. - * Accepted values are: "true" (The command bar is displayed.) - * "false" (The command bar is not displayed.) - */ - cmdbar?: CmdBarDisplay; - - /** - * Controls whether the Navigation bar is displayed on the form. - * Accepted values are: "on" (The navigation bar is displayed.) - * "off" (The navigation bar is not displayed.) - * "entity" (On an entity form, only the navigation options for related - * entities are available.) - */ - navbar?: NavBarDisplay; - } - - /** - * Interface for defining parameters on a request to open a view with main.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: - * "&key=value". - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - * - * @remarks A member for "pagetype" is not provided. The value "entitylist" is required in - * the URL, for views. Example: "pagetype=entitylist" - */ - export interface ViewOpenParameters - { - /** - * The logical name of the entity. - */ - etn: string; - - /** - * The unique identifier of a view, in Guid format, which is valid for the entity described by - * {@link etn}. - */ - viewid: string; - - /** - * The type of view identified by {@link viewid}. - * - * @remarks Accepted values are: 1039 System View - * 4230 User View. - */ - viewtype: XrmEnum.ViewType; - - /** - * Controls whether the command bar is displayed. - * Accepted values are: "true" (The command bar is displayed.) - * "false" (The command bar is not displayed.) - */ - cmdbar?: CmdBarDisplay; - - /** - * Controls whether the Navigation bar is displayed on the form. - * Accepted values are: "on" (The navigation bar is displayed.) - * "off" (The navigation bar is not displayed.) - * "entity" (On an entity form, only the navigation options for related - * entities are available.) - */ - navbar?: NavBarDisplay; - } - - /** - * Interface for defining parameters of a request to open a dialog with rundialog.aspx (as with - * window.open). Useful for parsing the keys and values into a string of the format: - * "&key=value". - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - */ - export interface DialogOpenParameters - { - /** - * The unique identifier of the dialog, in Guid format, which is valid for the entity described - * by: {@link EntityName} - */ - DialogId: string; - - /** - * The logical name of the entity. - */ - EntityName: string; - - /** - * The unique identifier for the targeted record. - */ - ObjectId: string; - } - - /** - * Interface for defining parameters of a request to open a report with viewer.apsx (as with - * window.open). Useful for parsing out the keys and values into a string of the format: - * "&key=value" - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328483.aspx} for details. - */ - export interface ReportOpenParameters - { - /** - * The action to perform, as either "run" or "filter". - * - * @remarks "run" Executes the report with default filters. - * "filter" Presents the user with the filter editor, and a "Run Report" button. - */ - action: ReportAction; - - /** - * The file name of the report. For out-of-box reports, this parameter enables context-sensitive - * help. - */ - helpID?: string; - - /** - * The unique identifier, held in the report's 'reportid' attribute, in Guid format. - */ - id: string; - } - } - - /** - * The Xrm.Utility API - * - * @see {@link http://msdn.microsoft.com/en-us/library/gg328255.aspx|Documentation} for details. - */ - export module Utility - { - export interface OpenParameters - { - /** - * Additional parameters can be provided to the request, by overloading - * this object with additional key and value pairs. This can only be used - * to provide default field values for the form, or pass data to custom - * parameters that have been customized for the form. - */ - [index: string]: string | undefined; - } - - /** - * Interface for defining parameters on a Xrm.Utility.openEntityForm() request. - */ - export interface FormOpenParameters extends OpenParameters - { - /** - * The identifier of the form to use, when several are available. - */ - formid?: string; - - /** - * Controls whether the Navigation bar is displayed on the form. - * Accepted values are: "on" (The navigation bar is displayed.) - * "off" (The navigation bar is not displayed.) - * "entity" (On an entity form, only the navigation options for related - * entities are available.) - */ - navbar?: Url.NavBarDisplay; - - /** - * Controls whether the command bar is displayed. - * Accepted values are: "true" (The command bar is displayed.) - * "false" (The command bar is not displayed.) - */ - cmdbar?: Url.CmdBarDisplay; - } - - /** - * Interface for window options. - */ - export interface WindowOptions - { - /** - * Direct the form to open in a new window. - */ - openInNewWindow: boolean; - } - } -} - -declare namespace XrmEnum -{ - /** - * Enumeration of entity form states/types. - */ - export const enum FormType - { - Undefined = 0, - Create = 1, - Update = 2, - ReadOnly = 3, - Disabled = 4, - BulkEdit = 6 - } - - /** - * Enumeration of entity form save modes. - */ - export const enum SaveMode - { - Save = 1, - SaveAndClose = 2, - SaveAndNew = 59, - AutoSave = 70, - SaveAsCompleted = 58, - Deactivate = 5, - Reactivate = 6, - Assign = 47, - Send = 7, - Qualify = 16, - Disqualify = 15 - } - - /** - * Enumeration of stage categories. - */ - export const enum StageCategory - { - Qualify = 0, - Develop = 1, - Propose = 2, - Close = 3, - Identify = 4, - Research = 5, - Resolve = 6 - } - - /** - * Enumeration of grid control context resolutions. - */ - export const enum GridControlContext - { - Unknown = 0, - RibbonContextForm = 1, - RibbonContextListing = 2, - FormContextUnrelated = 3, - FormContextRelated = 4 - } - - /** - * An enumeration for view types. - */ - export const enum ViewType - { - SystemView = 1039, - UserView = 4230 - } -} \ No newline at end of file From 2ceb210ab505742fbe18e0a77241de5b2beca45c Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 14 Sep 2017 10:27:49 -0600 Subject: [PATCH 031/486] Add separate process event contexts --- types/xrm/index.d.ts | 86 +++++++++++++++++++++++++++++++++++++----- types/xrm/xrm-tests.ts | 2 +- 2 files changed, 78 insertions(+), 10 deletions(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index d20992e385..f910412942 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -935,6 +935,11 @@ declare namespace Xrm { */ type AttributeType = "boolean" | "datetime" | "decimal" | "double" | "integer" | "lookup" | "memo" | "money" | "optionset" | "string"; + /** + * Direction types for a process stage change event + */ + type StageChangeDirection = "next" | "previous"; + /** * Attribute formats for Xrm.Page.Attribute.getFormat(). */ @@ -1074,15 +1079,6 @@ declare namespace Xrm { */ getDepth(): number; - /** - * Gets save-event arguments. - * - * @return The event arguments. - * - * @remarks Returns null for all but the "save" event. - */ - getEventArgs(): SaveEventArguments; - /** * Gets a reference to the object for which event occurred. * @@ -1114,6 +1110,43 @@ declare namespace Xrm { setSharedVariable(key: string, value: T): void; } + /** + * Interface for a save event context + */ + interface SaveEventContext extends EventContext { + /** + * Gets save-event arguments. + * + * @return The event arguments. + * + * @remarks Returns null for all but the "save" event. + */ + getEventArgs(): SaveEventArguments; + } + + /** + * Interface for a process stage change event context + */ + interface StageChangeEventContext extends EventContext { + /** + * Gets process stage change event arguments. + * + * @return The event arguments. + * + */ + getEventArgs(): StageChangeEventArguments; + } + + interface StageSelectedEventContext extends EventContext { + /** + * Gets process stage selected event arguments. + * + * @return The event arguments. + * + */ + getEventArgs(): StageSelectedEventArguments; + } + /** * Type for a context-sensitive handler. * @param {EventContext} context The context. @@ -1916,6 +1949,41 @@ declare namespace Xrm { preventDefault(): void; } + /** + * Interface for process stage change event arguments. + */ + interface StageChangeEventArguments { + /** + * Gets the direction of the stage change. + * + * @return The direction. + * + * @remarks Values returned are: "next" or "previous" + */ + getDirection(): Xrm.Page.StageChangeDirection; + + /** + * Gets the destionation stage object + * + * @return The stage object + * + * @remarks For switching between entities, returns the previous stage object + */ + getStage(): Xrm.Page.Stage; + } + + /** + * Interface for process stage selected event arguments. + */ + interface StageSelectedEventArguments { + /** + * Gets the selected stage object + * + * @return The stage object + */ + getStage(): Xrm.Page.Stage; + } + /** * Module for the Xrm.Page.data API. */ diff --git a/types/xrm/xrm-tests.ts b/types/xrm/xrm-tests.ts index 5b5b12c333..9d5173c5f7 100644 --- a/types/xrm/xrm-tests.ts +++ b/types/xrm/xrm-tests.ts @@ -83,7 +83,7 @@ Xrm.Page.ui.tabs.forEach((tab) => { /// Demonstrate OnSave event context. -Xrm.Page.data.entity.addOnSave((context) => { +Xrm.Page.data.entity.addOnSave((context : Xrm.Page.SaveEventContext) => { const eventArgs = context.getEventArgs(); if (eventArgs.getSaveMode() === XrmEnum.SaveMode.AutoSave || eventArgs.getSaveMode() === XrmEnum.SaveMode.SaveAndClose) From 41e178d963a2e55106e20f423fd7f311e8632861 Mon Sep 17 00:00:00 2001 From: Prabhdeep Singh Date: Thu, 14 Sep 2017 12:47:21 -0400 Subject: [PATCH 032/486] export all interfaces from pdfjs-dist --- types/pdfjs-dist/index.d.ts | 900 +++++++++++++-------------- types/pdfjs-dist/pdfjs-dist-tests.ts | 3 +- 2 files changed, 451 insertions(+), 452 deletions(-) diff --git a/types/pdfjs-dist/index.d.ts b/types/pdfjs-dist/index.d.ts index e70a0acb0d..a40c612d5a 100644 --- a/types/pdfjs-dist/index.d.ts +++ b/types/pdfjs-dist/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for PDF.js +// Type definitions for PDF.js v0.1.0 // Project: https://github.com/mozilla/pdf.js // Definitions by: Josh Baldwin // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -26,456 +26,454 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - -interface PDFPromise { - isResolved(): boolean; - isRejected(): boolean; - resolve(value: T): void; - reject(reason: string): void; - then(onResolve: (promise: T) => U, onReject?: (reason: string) => void): PDFPromise; -} - -interface PDFTreeNode { - title: string; - bold: boolean; - italic: boolean; - color: number[]; // [r,g,b] - dest: any; - items: PDFTreeNode[]; -} - -interface PDFInfo { - PDFFormatVersion: string; - IsAcroFormPresent: boolean; - IsXFAPresent: boolean; - [key: string]: any; // return type is string, typescript chokes -} - -interface PDFMetadata { - parse(): void; - get(name: string): string; - has(name: string): boolean; -} - -interface PDFSource { - url?: string; - data?: Uint8Array; - httpHeaders?: any; - password?: string; -} - -interface PDFProgressData { - loaded: number; - total: number; -} - -interface PDFDocumentProxy { - - /** - * Total number of pages the PDF contains. - **/ - numPages: number; - - /** - * A unique ID to identify a PDF. Not guaranteed to be unique. [jbaldwin: haha what] - **/ - fingerprint: string; - - /** - * True if embedded document fonts are in use. Will be set during rendering of the pages. - **/ - embeddedFontsUsed(): boolean; - - /** - * @param number The page number to get. The first page is 1. - * @return A promise that is resolved with a PDFPageProxy. - **/ - getPage(number: number): PDFPromise; - - /** - * TODO: return type of Promise - * A promise that is resolved with a lookup table for mapping named destinations to reference numbers. - **/ - getDestinations(): PDFPromise; - - /** - * A promise that is resolved with an array of all the JavaScript strings in the name tree. - **/ - getJavaScript(): PDFPromise; - - /** - * A promise that is resolved with an array that is a tree outline (if it has one) of the PDF. @see PDFTreeNode - **/ - getOutline(): PDFPromise; - - /** - * A promise that is resolved with the info and metadata of the PDF. - **/ - getMetadata(): PDFPromise<{ info: PDFInfo; metadata: PDFMetadata }>; - - /** - * Is the PDF encrypted? - **/ - isEncrypted(): PDFPromise; - - /** - * A promise that is resolved with Uint8Array that has the raw PDF data. - **/ - getData(): PDFPromise; - - /** - * TODO: return type of Promise - * A promise that is resolved when the document's data is loaded. - **/ - dataLoaded(): PDFPromise; - - /** - * - **/ - destroy(): void; -} - -interface PDFRef { - num: number; - gen: any; // todo -} - -interface PDFPageViewportOptions { - viewBox: any; - scale: number; - rotation: number; - offsetX: number; - offsetY: number; - dontFlip: boolean; -} - -interface PDFPageViewport { - width: number; - height: number; - fontScale: number; - transforms: number[]; - - clone(options: PDFPageViewportOptions): PDFPageViewport; - convertToViewportPoint(x: number, y: number): number[]; // [x, y] - convertToViewportRectangle(rect: number[]): number[]; // [x1, y1, x2, y2] - convertToPdfPoint(x: number, y: number): number[]; // [x, y] -} - -interface PDFAnnotationData { - subtype: string; - rect: number[]; // [x1, y1, x2, y2] - annotationFlags: any; // todo - color: number[]; // [r,g,b] - borderWidth: number; - hasAppearance: boolean; -} - -interface PDFAnnotations { - getData(): PDFAnnotationData; - hasHtml(): boolean; // always false - getHtmlElement(commonOjbs: any): HTMLElement; // throw new NotImplementedException() - getEmptyContainer(tagName: string, rect: number[]): HTMLElement; // deprecated - isViewable(): boolean; - loadResources(keys: any): PDFPromise; - getOperatorList(evaluator: any): PDFPromise; - // ... todo -} - -interface PDFRenderTextLayer { - beginLayout(): void; - endLayout(): void; - appendText(): void; -} - -interface PDFRenderImageLayer { - beginLayout(): void; - endLayout(): void; - appendImage(): void; -} - -interface PDFRenderParams { - canvasContext: CanvasRenderingContext2D; - viewport?: PDFPageViewport; - textLayer?: PDFRenderTextLayer; - imageLayer?: PDFRenderImageLayer; - continueCallback?: (_continue: () => void) => void; -} - -interface PDFViewerParams { - container: HTMLElement; - viewer?: HTMLElement; -} - -/** - * RenderTask is basically a promise but adds a cancel function to termiate it. - **/ -interface PDFRenderTask extends PDFPromise { - - /** - * Cancel the rendering task. If the task is currently rendering it will not be cancelled until graphics pauses with a timeout. The promise that this object extends will resolve when cancelled. - **/ - cancel(): void; -} - -interface PDFPageProxy { - - /** - * Page number of the page. First page is 1. - **/ - pageNumber: number; - - /** - * The number of degrees the page is rotated clockwise. - **/ - rotate: number; - - /** - * The reference that points to this page. - **/ - ref: PDFRef; - - /** - * @return An array of the visible portion of the PDF page in the user space units - [x1, y1, x2, y2]. - **/ - view: number[]; - - /** - * @param scale The desired scale of the viewport. - * @param rotate Degrees to rotate the viewport. If omitted this defaults to the page rotation. - * @return - **/ - getViewport(scale: number, rotate?: number): PDFPageViewport; - - /** - * A promise that is resolved with an array of the annotation objects. - **/ - getAnnotations(): PDFPromise; - - /** - * Begins the process of rendering a page to the desired context. - * @param params Rendering options. - * @return An extended promise that is resolved when the page finishes rendering. - **/ - render(params: PDFRenderParams): PDFRenderTask; - - /** - * A promise that is resolved with the string that is the text content frm the page. - **/ - getTextContent(): PDFPromise; - - /** - * marked as future feature - **/ - //getOperationList(): PDFPromise<>; - - /** - * Destroyes resources allocated by the page. - **/ - destroy(): void; -} - -interface TextContentItem { - str: string; - transform: number[]; // [0..5] 4=x, 5=y - width: number; - height: number; - dir: string; // Left-to-right (ltr), etc - fontName: string; // A lookup into the styles map of the owning TextContent -} - -interface TextContent { - items: TextContentItem[]; - styles: any; -} - -/** - * A PDF document and page is built of many objects. E.g. there are objects for fonts, images, rendering code and such. These objects might get processed inside of a worker. The `PDFObjects` implements some basic functions to manage these objects. - **/ -interface PDFObjects { - get(objId: number, callback?: any): any; - resolve(objId: number, data: any): any; - isResolved(objId: number): boolean; - hasData(objId: number): boolean; - getData(objId: number): any; - clear(): void; -} - -interface PDFJSUtilStatic { - /** - * Normalize rectangle so that (x1,y1) < (x2,y2) - * @param {number[]} rect - the rectangle with [x1,y1,x2,y2] - * - * For coordinate systems whose origin lies in the bottom-left, this - * means normalization to (BL,TR) ordering. For systems with origin in the - * top-left, this means (TL,BR) ordering. - **/ - normalizeRect(rect:number[]): number[]; -} - -interface PDFJSStatic { - - /** - * The maximum allowed image size in total pixels e.g. width * height. Images above this value will not be drawn. Use -1 for no limit. - **/ - maxImageSize: number; - - /** - * The url of where the predefined Adobe CMaps are located. Include trailing - * slash. - */ - cMapUrl: string; - - /** - * Specifies if CMaps are binary packed. - */ - cMapPacked: boolean; - - /** - * By default fonts are converted to OpenType fonts and loaded via font face rules. If disabled, the font will be rendered using a built in font renderer that constructs the glyphs with primitive path commands. - **/ - disableFontFace: boolean; - - /** - * Path for image resources, mainly for annotation icons. Include trailing - * slash. - */ - imageResourcesPath: string; - - /** - * Disable the web worker and run all code on the main thread. This will happen - * automatically if the browser doesn't support workers or sending typed arrays - * to workers. - */ - disableWorker: boolean; - - /** - * Path and filename of the worker file. Required when the worker is enabled in - * development mode. If unspecified in the production build, the worker will be - * loaded based on the location of the pdf.js file. - */ - workerSrc: string; - - /** - * Disable range request loading of PDF files. When enabled and if the server - * supports partial content requests then the PDF will be fetched in chunks. - * Enabled (false) by default. - */ - disableRange: boolean; - - /** - * Disable streaming of PDF file data. By default PDF.js attempts to load PDF - * in chunks. This default behavior can be disabled. - */ - disableStream: boolean; - - /** - * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js - * will automatically keep fetching more data even if it isn't needed to display - * the current page. This default behavior can be disabled. - * - * NOTE: It is also necessary to disable streaming, see above, - * in order for disabling of pre-fetching to work correctly. - */ - disableAutoFetch: boolean; - - /** - * Enables special hooks for debugging PDF.js. - */ - pdfBug: boolean; - - /** - * Enables transfer usage in postMessage for ArrayBuffers. - */ - postMessageTransfers: boolean; - - /** - * Disables URL.createObjectURL usage. - */ - disableCreateObjectURL: boolean; - - /** - * Disables WebGL usage. - */ - disableWebGL: boolean; - - /** - * Disables fullscreen support, and by extension Presentation Mode, - * in browsers which support the fullscreen API. - */ - disableFullscreen: boolean; - - /** - * Enables CSS only zooming. - */ - useOnlyCssZoom: boolean; - - /** - * Controls the logging level. - * The constants from PDFJS.VERBOSITY_LEVELS should be used: - * - errors - * - warnings [default] - * - infos - */ - verbosity: number; - - /** - * The maximum supported canvas size in total pixels e.g. width * height. - * The default value is 4096 * 4096. Use -1 for no limit. - */ - maxCanvasPixels: number; - - /** - * Opens external links in a new window if enabled. The default behavior opens - * external links in the PDF.js window. - */ - openExternalLinksInNewWindow: boolean; - - /** - * Determines if we can eval strings as JS. Primarily used to improve - * performance for font rendering. - */ - isEvalSupported: boolean; - - Util: PDFJSUtilStatic; - - /** - * This is the main entry point for loading a PDF and interacting with it. - * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR) - * is used, which means it must follow the same origin rules that any XHR does - * e.g. No corss domain requests without CORS. - * @param source - * @param pdfDataRangeTransport Used if you want to manually server range requests for data in the PDF. @ee viewer.js for an example of pdfDataRangeTransport's interface. - * @param passwordCallback Used to request a password if wrong or no password was provided. The callback receives two parameters: function that needs to be called with new password and the reason. - * @param progressCallback Progress callback. - * @return A promise that is resolved with PDFDocumentProxy object. - **/ - getDocument( - source: string, - pdfDataRangeTransport?: any, - passwordCallback?: (fn: (password: string) => void, reason: string) => string, - progressCallback?: (progressData: PDFProgressData) => void) - : PDFPromise; - - getDocument( - source: Uint8Array, - pdfDataRangeTransport?: any, - passwordCallback?: (fn: (password: string) => void, reason: string) => string, - progressCallback?: (progressData: PDFProgressData) => void) - : PDFPromise; - - getDocument( - source: PDFSource, - pdfDataRangeTransport?: any, - passwordCallback?: (fn: (password: string) => void, reason: string) => string, - progressCallback?: (progressData: PDFProgressData) => void) - : PDFPromise; - - PDFViewer(params: PDFViewerParams): void; -} - -declare var PDFJS: PDFJSStatic; - declare module "pdfjs-dist" { - export = PDFJS; + export = PDF; } +declare namespace PDF { + interface PDFPromise { + isResolved(): boolean; + isRejected(): boolean; + resolve(value: T): void; + reject(reason: string): void; + then(onResolve: (promise: T) => U, onReject?: (reason: string) => void): PDFPromise; + } + + interface PDFTreeNode { + title: string; + bold: boolean; + italic: boolean; + color: number[]; // [r,g,b] + dest: any; + items: PDFTreeNode[]; + } + + interface PDFInfo { + PDFFormatVersion: string; + IsAcroFormPresent: boolean; + IsXFAPresent: boolean; + [key: string]: any; // return type is string, typescript chokes + } + + interface PDFMetadata { + parse(): void; + get(name: string): string; + has(name: string): boolean; + } + + interface PDFSource { + url?: string; + data?: Uint8Array; + httpHeaders?: any; + password?: string; + } + + interface PDFProgressData { + loaded: number; + total: number; + } + + interface PDFDocumentProxy { + + /** + * Total number of pages the PDF contains. + **/ + numPages: number; + + /** + * A unique ID to identify a PDF. Not guaranteed to be unique. [jbaldwin: haha what] + **/ + fingerprint: string; + + /** + * True if embedded document fonts are in use. Will be set during rendering of the pages. + **/ + embeddedFontsUsed(): boolean; + + /** + * @param number The page number to get. The first page is 1. + * @return A promise that is resolved with a PDFPageProxy. + **/ + getPage(number: number): PDFPromise; + + /** + * TODO: return type of Promise + * A promise that is resolved with a lookup table for mapping named destinations to reference numbers. + **/ + getDestinations(): PDFPromise; + + /** + * A promise that is resolved with an array of all the JavaScript strings in the name tree. + **/ + getJavaScript(): PDFPromise; + + /** + * A promise that is resolved with an array that is a tree outline (if it has one) of the PDF. @see PDFTreeNode + **/ + getOutline(): PDFPromise; + + /** + * A promise that is resolved with the info and metadata of the PDF. + **/ + getMetadata(): PDFPromise<{ info: PDFInfo; metadata: PDFMetadata }>; + + /** + * Is the PDF encrypted? + **/ + isEncrypted(): PDFPromise; + + /** + * A promise that is resolved with Uint8Array that has the raw PDF data. + **/ + getData(): PDFPromise; + + /** + * TODO: return type of Promise + * A promise that is resolved when the document's data is loaded. + **/ + dataLoaded(): PDFPromise; + + /** + * + **/ + destroy(): void; + } + + interface PDFRef { + num: number; + gen: any; // todo + } + + interface PDFPageViewportOptions { + viewBox: any; + scale: number; + rotation: number; + offsetX: number; + offsetY: number; + dontFlip: boolean; + } + + interface PDFPageViewport { + width: number; + height: number; + fontScale: number; + transforms: number[]; + + clone(options: PDFPageViewportOptions): PDFPageViewport; + convertToViewportPoint(x: number, y: number): number[]; // [x, y] + convertToViewportRectangle(rect: number[]): number[]; // [x1, y1, x2, y2] + convertToPdfPoint(x: number, y: number): number[]; // [x, y] + } + + interface PDFAnnotationData { + subtype: string; + rect: number[]; // [x1, y1, x2, y2] + annotationFlags: any; // todo + color: number[]; // [r,g,b] + borderWidth: number; + hasAppearance: boolean; + } + + interface PDFAnnotations { + getData(): PDFAnnotationData; + hasHtml(): boolean; // always false + getHtmlElement(commonOjbs: any): HTMLElement; // throw new NotImplementedException() + getEmptyContainer(tagName: string, rect: number[]): HTMLElement; // deprecated + isViewable(): boolean; + loadResources(keys: any): PDFPromise; + getOperatorList(evaluator: any): PDFPromise; + // ... todo + } + + interface PDFRenderTextLayer { + beginLayout(): void; + endLayout(): void; + appendText(): void; + } + + interface PDFRenderImageLayer { + beginLayout(): void; + endLayout(): void; + appendImage(): void; + } + + interface PDFRenderParams { + canvasContext: CanvasRenderingContext2D; + viewport?: PDFPageViewport; + textLayer?: PDFRenderTextLayer; + imageLayer?: PDFRenderImageLayer; + continueCallback?: (_continue: () => void) => void; + } + + interface PDFViewerParams { + container: HTMLElement; + viewer?: HTMLElement; + } + + /** + * RenderTask is basically a promise but adds a cancel function to termiate it. + **/ + interface PDFRenderTask extends PDFPromise { + + /** + * Cancel the rendering task. If the task is currently rendering it will not be cancelled until graphics pauses with a timeout. The promise that this object extends will resolve when cancelled. + **/ + cancel(): void; + } + + interface PDFPageProxy { + + /** + * Page number of the page. First page is 1. + **/ + pageNumber: number; + + /** + * The number of degrees the page is rotated clockwise. + **/ + rotate: number; + + /** + * The reference that points to this page. + **/ + ref: PDFRef; + + /** + * @return An array of the visible portion of the PDF page in the user space units - [x1, y1, x2, y2]. + **/ + view: number[]; + + /** + * @param scale The desired scale of the viewport. + * @param rotate Degrees to rotate the viewport. If omitted this defaults to the page rotation. + * @return + **/ + getViewport(scale: number, rotate?: number): PDFPageViewport; + + /** + * A promise that is resolved with an array of the annotation objects. + **/ + getAnnotations(): PDFPromise; + + /** + * Begins the process of rendering a page to the desired context. + * @param params Rendering options. + * @return An extended promise that is resolved when the page finishes rendering. + **/ + render(params: PDFRenderParams): PDFRenderTask; + + /** + * A promise that is resolved with the string that is the text content frm the page. + **/ + getTextContent(): PDFPromise; + + /** + * marked as future feature + **/ + //getOperationList(): PDFPromise<>; + + /** + * Destroyes resources allocated by the page. + **/ + destroy(): void; + } + + interface TextContentItem { + str: string; + transform: number[]; // [0..5] 4=x, 5=y + width: number; + height: number; + dir: string; // Left-to-right (ltr), etc + fontName: string; // A lookup into the styles map of the owning TextContent + } + + interface TextContent { + items: TextContentItem[]; + styles: any; + } + + /** + * A PDF document and page is built of many objects. E.g. there are objects for fonts, images, rendering code and such. These objects might get processed inside of a worker. The `PDFObjects` implements some basic functions to manage these objects. + **/ + interface PDFObjects { + get(objId: number, callback?: any): any; + resolve(objId: number, data: any): any; + isResolved(objId: number): boolean; + hasData(objId: number): boolean; + getData(objId: number): any; + clear(): void; + } + + interface PDFJSUtilStatic { + /** + * Normalize rectangle so that (x1,y1) < (x2,y2) + * @param {number[]} rect - the rectangle with [x1,y1,x2,y2] + * + * For coordinate systems whose origin lies in the bottom-left, this + * means normalization to (BL,TR) ordering. For systems with origin in the + * top-left, this means (TL,BR) ordering. + **/ + normalizeRect(rect:number[]): number[]; + } + + interface PDFJSStatic { + + /** + * The maximum allowed image size in total pixels e.g. width * height. Images above this value will not be drawn. Use -1 for no limit. + **/ + maxImageSize: number; + + /** + * The url of where the predefined Adobe CMaps are located. Include trailing + * slash. + */ + cMapUrl: string; + + /** + * Specifies if CMaps are binary packed. + */ + cMapPacked: boolean; + + /** + * By default fonts are converted to OpenType fonts and loaded via font face rules. If disabled, the font will be rendered using a built in font renderer that constructs the glyphs with primitive path commands. + **/ + disableFontFace: boolean; + + /** + * Path for image resources, mainly for annotation icons. Include trailing + * slash. + */ + imageResourcesPath: string; + + /** + * Disable the web worker and run all code on the main thread. This will happen + * automatically if the browser doesn't support workers or sending typed arrays + * to workers. + */ + disableWorker: boolean; + + /** + * Path and filename of the worker file. Required when the worker is enabled in + * development mode. If unspecified in the production build, the worker will be + * loaded based on the location of the pdf.js file. + */ + workerSrc: string; + + /** + * Disable range request loading of PDF files. When enabled and if the server + * supports partial content requests then the PDF will be fetched in chunks. + * Enabled (false) by default. + */ + disableRange: boolean; + + /** + * Disable streaming of PDF file data. By default PDF.js attempts to load PDF + * in chunks. This default behavior can be disabled. + */ + disableStream: boolean; + + /** + * Disable pre-fetching of PDF file data. When range requests are enabled PDF.js + * will automatically keep fetching more data even if it isn't needed to display + * the current page. This default behavior can be disabled. + * + * NOTE: It is also necessary to disable streaming, see above, + * in order for disabling of pre-fetching to work correctly. + */ + disableAutoFetch: boolean; + + /** + * Enables special hooks for debugging PDF.js. + */ + pdfBug: boolean; + + /** + * Enables transfer usage in postMessage for ArrayBuffers. + */ + postMessageTransfers: boolean; + + /** + * Disables URL.createObjectURL usage. + */ + disableCreateObjectURL: boolean; + + /** + * Disables WebGL usage. + */ + disableWebGL: boolean; + + /** + * Disables fullscreen support, and by extension Presentation Mode, + * in browsers which support the fullscreen API. + */ + disableFullscreen: boolean; + + /** + * Enables CSS only zooming. + */ + useOnlyCssZoom: boolean; + + /** + * Controls the logging level. + * The constants from PDFJS.VERBOSITY_LEVELS should be used: + * - errors + * - warnings [default] + * - infos + */ + verbosity: number; + + /** + * The maximum supported canvas size in total pixels e.g. width * height. + * The default value is 4096 * 4096. Use -1 for no limit. + */ + maxCanvasPixels: number; + + /** + * Opens external links in a new window if enabled. The default behavior opens + * external links in the PDF.js window. + */ + openExternalLinksInNewWindow: boolean; + + /** + * Determines if we can eval strings as JS. Primarily used to improve + * performance for font rendering. + */ + isEvalSupported: boolean; + + Util: PDFJSUtilStatic; + + /** + * This is the main entry point for loading a PDF and interacting with it. + * NOTE: If a URL is used to fetch the PDF data a standard XMLHttpRequest(XHR) + * is used, which means it must follow the same origin rules that any XHR does + * e.g. No corss domain requests without CORS. + * @param source + * @param pdfDataRangeTransport Used if you want to manually server range requests for data in the PDF. @ee viewer.js for an example of pdfDataRangeTransport's interface. + * @param passwordCallback Used to request a password if wrong or no password was provided. The callback receives two parameters: function that needs to be called with new password and the reason. + * @param progressCallback Progress callback. + * @return A promise that is resolved with PDFDocumentProxy object. + **/ + getDocument( + source: string, + pdfDataRangeTransport?: any, + passwordCallback?: (fn: (password: string) => void, reason: string) => string, + progressCallback?: (progressData: PDFProgressData) => void) + : PDFPromise; + + getDocument( + source: Uint8Array, + pdfDataRangeTransport?: any, + passwordCallback?: (fn: (password: string) => void, reason: string) => string, + progressCallback?: (progressData: PDFProgressData) => void) + : PDFPromise; + + getDocument( + source: PDFSource, + pdfDataRangeTransport?: any, + passwordCallback?: (fn: (password: string) => void, reason: string) => string, + progressCallback?: (progressData: PDFProgressData) => void) + : PDFPromise; + + PDFViewer(params: PDFViewerParams): void; + } +} diff --git a/types/pdfjs-dist/pdfjs-dist-tests.ts b/types/pdfjs-dist/pdfjs-dist-tests.ts index 6b22b56f46..cd2325975a 100644 --- a/types/pdfjs-dist/pdfjs-dist-tests.ts +++ b/types/pdfjs-dist/pdfjs-dist-tests.ts @@ -1,10 +1,11 @@ - +import { PDFJSStatic, PDFDocumentProxy, PDFPromise } from 'pdfjs-dist'; // // Fetch the PDF document from the URL using promises // var pdfDoc: PDFDocumentProxy; var pageNum: number; +var PDFJS: PDFJSStatic; PDFJS.getDocument('helloworld.pdf').then(function (pdf) { // Using promise to fetch the page From 2fd410d80dbe07df7c00354d549dcecce6cbc4b9 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 14 Sep 2017 10:47:22 -0600 Subject: [PATCH 033/486] Fix lint errors --- types/xrm/index.d.ts | 10 +++++----- types/xrm/xrm-tests.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index f910412942..cc51db6dfb 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -1960,16 +1960,16 @@ declare namespace Xrm { * * @remarks Values returned are: "next" or "previous" */ - getDirection(): Xrm.Page.StageChangeDirection; + getDirection(): StageChangeDirection; /** * Gets the destionation stage object * * @return The stage object - * + * * @remarks For switching between entities, returns the previous stage object */ - getStage(): Xrm.Page.Stage; + getStage(): Stage; } /** @@ -1978,10 +1978,10 @@ declare namespace Xrm { interface StageSelectedEventArguments { /** * Gets the selected stage object - * + * * @return The stage object */ - getStage(): Xrm.Page.Stage; + getStage(): Stage; } /** diff --git a/types/xrm/xrm-tests.ts b/types/xrm/xrm-tests.ts index 9d5173c5f7..182afa1450 100644 --- a/types/xrm/xrm-tests.ts +++ b/types/xrm/xrm-tests.ts @@ -83,7 +83,7 @@ Xrm.Page.ui.tabs.forEach((tab) => { /// Demonstrate OnSave event context. -Xrm.Page.data.entity.addOnSave((context : Xrm.Page.SaveEventContext) => { +Xrm.Page.data.entity.addOnSave((context: Xrm.Page.SaveEventContext) => { const eventArgs = context.getEventArgs(); if (eventArgs.getSaveMode() === XrmEnum.SaveMode.AutoSave || eventArgs.getSaveMode() === XrmEnum.SaveMode.SaveAndClose) From 4c389ad82c252c5ec5083621de4b6b0baae0b215 Mon Sep 17 00:00:00 2001 From: Yun Shi Date: Thu, 14 Sep 2017 12:55:50 -0400 Subject: [PATCH 034/486] added leaflet-draw handlers --- types/leaflet-draw/index.d.ts | 68 ++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/types/leaflet-draw/index.d.ts b/types/leaflet-draw/index.d.ts index 5ae8c81605..ed654dd862 100644 --- a/types/leaflet-draw/index.d.ts +++ b/types/leaflet-draw/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for leaflet-draw 0.4 // Project: https://github.com/Leaflet/Leaflet.draw -// Definitions by: Matt Guest , Ryan Blace +// Definitions by: Matt Guest +// Ryan Blace +// Yun Shi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -252,6 +254,70 @@ declare module 'leaflet' { const DELETESTART: string; const DELETESTOP: string; } + + class Feature { + initialize(): void; + /** + * Enables this handler. + */ + enable(): void; + /** + * Add's event listeners to this handler + */ + addHooks(): void; + /** + * Removes event listeners from this handler + */ + removeHooks(): void; + /** + * Sets new options to this handler + */ + setOptions(options: DrawOptions.EditHandlerOptions): void; + } + + class SimpleShape extends Feature { } + + class Marker extends Feature { + constructor( + map: Map, + options?: DrawOptions.MarkerOptions + ) + } + + class CircleMarker extends Feature { + constructor( + map: Map, + options?: DrawOptions.MarkerOptions + ) + } + + class Circle extends Feature { + constructor( + map: Map, + options?: DrawOptions.CircleOptions + ) + } + + class Polyline extends Feature { + constructor( + map: Map, + options?: DrawOptions.PolylineOptions + ) + } + + class Rectangle extends Feature { + constructor( + map: Map, + options?: DrawOptions.RectangleOptions + ) + } + + class Polygon extends Feature { + constructor( + map: Map, + options?: DrawOptions.PolygonOptions + ) + } } namespace DrawEvents { From e1251442e96b77f66223f64fd93c4a544689183f Mon Sep 17 00:00:00 2001 From: Yun Shi Date: Thu, 14 Sep 2017 13:02:44 -0400 Subject: [PATCH 035/486] set strictNullChecks to true --- types/leaflet-draw/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/leaflet-draw/tsconfig.json b/types/leaflet-draw/tsconfig.json index dbb1fec45a..e36b77de72 100644 --- a/types/leaflet-draw/tsconfig.json +++ b/types/leaflet-draw/tsconfig.json @@ -7,7 +7,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "baseUrl": "../", "typeRoots": [ "../" From b1f90b093faf8b4eb8987e55f2fce94bc7c3f9b4 Mon Sep 17 00:00:00 2001 From: Yun Shi Date: Thu, 14 Sep 2017 13:34:01 -0400 Subject: [PATCH 036/486] super prototype --- types/leaflet-draw/index.d.ts | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/types/leaflet-draw/index.d.ts b/types/leaflet-draw/index.d.ts index ed654dd862..00b0323839 100644 --- a/types/leaflet-draw/index.d.ts +++ b/types/leaflet-draw/index.d.ts @@ -255,25 +255,7 @@ declare module 'leaflet' { const DELETESTOP: string; } - class Feature { - initialize(): void; - /** - * Enables this handler. - */ - enable(): void; - /** - * Add's event listeners to this handler - */ - addHooks(): void; - /** - * Removes event listeners from this handler - */ - removeHooks(): void; - /** - * Sets new options to this handler - */ - setOptions(options: DrawOptions.EditHandlerOptions): void; - } + class Feature extends Handler { } class SimpleShape extends Feature { } From c7b816f1a2a58662c5b18295aec886600e41c9d2 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 14 Sep 2017 12:18:23 -0600 Subject: [PATCH 037/486] Typo fix --- types/xrm/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index cc51db6dfb..a1f9296541 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -1963,7 +1963,7 @@ declare namespace Xrm { getDirection(): StageChangeDirection; /** - * Gets the destionation stage object + * Gets the destination stage object * * @return The stage object * From bae8cad188cc776c633eb935685356fbbb4590c7 Mon Sep 17 00:00:00 2001 From: Santiago M Vilar Date: Thu, 14 Sep 2017 15:23:37 -0300 Subject: [PATCH 038/486] Add editorState param to event handlers --- types/draft-js/draft-js-tests.tsx | 3 +-- types/draft-js/index.d.ts | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/types/draft-js/draft-js-tests.tsx b/types/draft-js/draft-js-tests.tsx index 46f90a8a31..dae23b90ef 100644 --- a/types/draft-js/draft-js-tests.tsx +++ b/types/draft-js/draft-js-tests.tsx @@ -68,13 +68,12 @@ class RichEditorExample extends React.Component<{}, { editorState: EditorState } return getDefaultKeyBinding(e); } - handleKeyCommand = (command: string) => { + handleKeyCommand = (command: string, editorState: EditorState) => { if (command === SPLIT_HEADER_BLOCK) { this.onChange(this.splitHeaderToNewBlock()); return 'handled'; } - const {editorState} = this.state; const newState = RichUtils.handleKeyCommand(editorState, command); if (newState) { diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index af97b6d676..6420669a3a 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Draft.js v0.10.0 +// Type definitions for Draft.js v0.10.1 // Project: https://facebook.github.io/draft-js/ // Definitions by: Dmitry Rogozhny // Eelco Lempsink @@ -6,6 +6,7 @@ // Ryan Schwers // Michael Wu // Willis Plummer +// Santiago Vilar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -125,20 +126,20 @@ declare namespace Draft { // Useful for managing special behavior for pressing the `Return` key. E.g. // removing the style from an empty list item. - handleReturn?(e: SyntheticKeyboardEvent): DraftHandleValue, + handleReturn?(e: SyntheticKeyboardEvent, editorState: EditorState): DraftHandleValue, // Map a key command string provided by your key binding function to a // specified behavior. - handleKeyCommand?(command: EditorCommand): DraftHandleValue, + handleKeyCommand?(command: EditorCommand, editorState: EditorState): DraftHandleValue, // Handle intended text insertion before the insertion occurs. This may be // useful in cases where the user has entered characters that you would like // to trigger some special behavior. E.g. immediately converting `:)` to an // emoji Unicode character, or replacing ASCII quote characters with smart // quotes. - handleBeforeInput?(chars: string): DraftHandleValue, + handleBeforeInput?(chars: string, editorState: EditorState): DraftHandleValue, - handlePastedText?(text: string, html?: string): DraftHandleValue, + handlePastedText?(text: string, html: string|undefined, editorState: EditorState): DraftHandleValue, handlePastedFiles?(files: Array): DraftHandleValue, From f8f7d974879998f7b035f0ffc75512c474d6eeec Mon Sep 17 00:00:00 2001 From: Michal Lower Date: Thu, 14 Sep 2017 20:18:29 +0200 Subject: [PATCH 039/486] [noble] add missing noble.removeListener functions and noble.state variable --- types/noble/index.d.ts | 9 +++++++++ types/noble/noble-tests.ts | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/types/noble/index.d.ts b/types/noble/index.d.ts index d62b0609a8..773330d767 100644 --- a/types/noble/index.d.ts +++ b/types/noble/index.d.ts @@ -5,6 +5,7 @@ // Shantanu Bhadoria // Luke Libraro // Dan Chao +// Michal Lower // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -23,6 +24,14 @@ export declare function on(event: "scanStart", listener: () => void): events.Eve export declare function on(event: "scanStop", listener: () => void): events.EventEmitter; export declare function on(event: "discover", listener: (peripheral: Peripheral) => void): events.EventEmitter; +export declare function removeListener(event: string, listener: Function): events.EventEmitter; +export declare function removeListener(event: "stateChange", listener: (state: string) => void): events.EventEmitter; +export declare function removeListener(event: "scanStart", listener: () => void): events.EventEmitter; +export declare function removeListener(event: "scanStop", listener: () => void): events.EventEmitter; +export declare function removeListener(event: "discover", listener: (peripheral: Peripheral) => void): events.EventEmitter; + +export declare var state:string; + export declare class Peripheral extends events.EventEmitter { id: string; uuid: string; diff --git a/types/noble/noble-tests.ts b/types/noble/noble-tests.ts index c790f2deb0..65e13f4d43 100644 --- a/types/noble/noble-tests.ts +++ b/types/noble/noble-tests.ts @@ -27,6 +27,14 @@ noble.on("discover", (peripheral: noble.Peripheral): void => { peripheral.disconnect((): void => {}); }); +noble.removeListener("stateChange", (state: string): void => {}); +noble.removeListener("scanStart", (): void => {}); +noble.removeListener("scanStop", (): void => {}); +noble.removeListener("discover", (peripheral: noble.Peripheral): void => { + peripheral.connect((error: string): void => {}); + peripheral.disconnect((): void => {}); +}); + var peripheral: noble.Peripheral = new noble.Peripheral(); peripheral.uuid = "12ad4e81"; peripheral.advertisement = { From bef6849dac841942c50bf175cc1eb89a5284f703 Mon Sep 17 00:00:00 2001 From: Niklas Mollenhauer Date: Thu, 14 Sep 2017 22:27:52 +0200 Subject: [PATCH 040/486] Fix parse_response type and use lookup type --- types/needle/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/needle/index.d.ts b/types/needle/index.d.ts index cc3fa4ff32..491b782130 100644 --- a/types/needle/index.d.ts +++ b/types/needle/index.d.ts @@ -42,7 +42,7 @@ declare namespace core { /** * Alias for open_timeout */ - timeout?: number; + timeout?: RequestOptions['open_timeout']; /** * Returns error if data transfer takes longer than X milisecs, @@ -56,7 +56,7 @@ declare namespace core { /** * Alias for follow_max */ - follow?: number; + follow?: RequestOptions['follow_max']; /** * Enables multipart/form-data encoding. Defaults to false. @@ -155,7 +155,7 @@ declare namespace core { /** * Alias for decode_response */ - decode?: boolean; + decode?: ResponseOptions['decode_response']; /** * Whether to parse XML or JSON response bodies automagically. @@ -163,11 +163,11 @@ declare namespace core { * 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; + parse_response?: boolean | 'json' | 'xml'; /** * Alias for parse_response */ - parse?: boolean; + parse?: ResponseOptions['parse_response']; /** * Whether to parse response’s Set-Cookie header. From 64fa17e7793ca750d960bfa0ae801e6862535fde Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 14 Sep 2017 14:41:22 -0600 Subject: [PATCH 041/486] Change stage direction to proper case --- types/xrm/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index a1f9296541..26cba57ab5 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -938,7 +938,7 @@ declare namespace Xrm { /** * Direction types for a process stage change event */ - type StageChangeDirection = "next" | "previous"; + type StageChangeDirection = "Next" | "Previous"; /** * Attribute formats for Xrm.Page.Attribute.getFormat(). From 2cd0f0578c60a0c48fd71cf5574553e46f4d9269 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Thu, 14 Sep 2017 14:33:02 -0700 Subject: [PATCH 042/486] [react-data-grid] Added openCellEditor signature to ReactDataGrid instance --- types/react-data-grid/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/react-data-grid/index.d.ts b/types/react-data-grid/index.d.ts index 894ebf95aa..e1583f4c48 100644 --- a/types/react-data-grid/index.d.ts +++ b/types/react-data-grid/index.d.ts @@ -430,7 +430,12 @@ declare namespace AdazzleReactDataGrid { * Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like * http://adazzle.github.io/react-data-grid/ */ - export class ReactDataGrid extends React.Component { } + export class ReactDataGrid extends React.Component { + /** + * Opens the editor for the cell (idx) in the given row (rowIdx). If the column is not editable then nothing will happen. + */ + openCellEditor(rowIdx: number, idx: number): void; + } export namespace ReactDataGrid { // Useful types export import Column = AdazzleReactDataGrid.Column; From 6d87ef3695e3bf73546bbf4846cb6db68bf565e3 Mon Sep 17 00:00:00 2001 From: Derek Finlinson Date: Thu, 14 Sep 2017 16:35:59 -0600 Subject: [PATCH 043/486] Add remaining missing Xrm.Page.data.process methods --- types/xrm/index.d.ts | 116 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 114 insertions(+), 2 deletions(-) diff --git a/types/xrm/index.d.ts b/types/xrm/index.d.ts index 26cba57ab5..a3b49f391d 100644 --- a/types/xrm/index.d.ts +++ b/types/xrm/index.d.ts @@ -893,7 +893,12 @@ declare namespace Xrm { /** * Status for Xrm.Page.Stage.getStatus(). */ - type Status = "active" | "inactive"; + type StageStatus = "active" | "inactive"; + + /** + * Status for Xrm.Page.Process.getStatus(). + */ + type ProcessStatus = "active" | "aborted" | "finished"; /** * Submit Mode for Xrm.Page.Attribute.getSubmitMode() and Xrm.Page.Attribute.setSubmitMode(). @@ -1022,7 +1027,7 @@ declare namespace Xrm { * * @remarks This method will return either "active" or "inactive". */ - getStatus(): Status; + getStatus(): StageStatus; /** * Returns a collection of steps in the stage. @@ -1153,6 +1158,12 @@ declare namespace Xrm { */ type ContextSensitiveHandler = (context: EventContext) => void; + /** + * Type for a process status change handler. + * @param {ProcessStatus} status The process status. + */ + type ProcessStatusChangeHandler = (status: ProcessStatus) => void; + /** * Interface for UI elements with labels. */ @@ -2007,6 +2018,21 @@ declare namespace Xrm { */ setActiveProcess(processId: string, callbackFunction?: ProcessCallbackDelegate): void; + /** + * Returns all process instances for the entity record that the calling user has access to. + * + * @param {function} callbackFunction (Optional) a function to call when the operation is complete. + */ + getProcessInstances(callbackFunction: GetProcessInstancesDelegate): void; + + /** + * Sets a process instance as the active instance + * + * @param {string} processInstanceId The Id of the process instance to make the active instance. + * @param {function} callbackFunction (Optional) a function to call when the operation is complete. + */ + setActiveProcessInstance(processInstanceId: string, callbackFunction: SetProcessInstanceDelegate): void; + /** * Returns a Stage object representing the active stage. * @@ -2069,6 +2095,19 @@ declare namespace Xrm { */ addOnStageChange(handler: ContextSensitiveHandler): void; + /** + * Use this to add a function as an event handler for the OnProcessStatusChange event so that it will be called when the + * business process flow status changes. + * @param {ProcessStatusChangeHandler} handler The function will be added to the bottom of the event + * handler pipeline. The execution context is automatically + * set to be the first parameter passed to the event handler. + * + * Use a reference to a named function rather than an + * anonymous function if you may later want to remove the + * event handler. + */ + addOnProcessStatusChange(handler: ProcessStatusChangeHandler): void; + /** * Use this to add a function as an event handler for the OnStageSelected event so that it will be called * when a business process flow stage is selected. @@ -2083,6 +2122,14 @@ declare namespace Xrm { */ addOnStageSelected(handler: ContextSensitiveHandler): void; + /** + * Use this to remove a function as an event handler for the OnProcessStatusChange event. + * + * @param {ProcessStatusChangeHandler} handler If an anonymous function is set using the addOnProcessStatusChange method it + * cannot be removed using this method. + */ + removeOnProcessStatusChange(handler: ProcessStatusChangeHandler): void; + /** * Use this to remove a function as an event handler for the OnStageChange event. * @@ -2114,8 +2161,62 @@ declare namespace Xrm { * complete. */ movePrevious(callbackFunction?: ProcessCallbackDelegate): void; + + /** + * Use this method to get the unique identifier of the process instance + * + * @return The unique identifier of the process instance + */ + getInstanceId(): string; + + /** + * Use this method to get the name of the process instance + * + * @return The name of the process instance + */ + getInstanceName(): string; + + /** + * Use this method to get the current status of the process instance + * + * @return The current status of the process + */ + getStatus(): ProcessStatus; + + /** + * Use this method to set the current status of the process instance + * + * @param {ProcessStatus} status The new status for the process + * @param {function} callbackFunction (Optional) a function to call when the operation is complete. + */ + setStatus(status: ProcessStatus, callbackFunction: ProcessSetStatusDelegate): void; } + /** + * Called when method to get active processes is complete + * + * @param {string} status The result of the get active processes operation. + * + * @remarks Returns object with the following key-value pairs: + * CreatedOn + * ProcessDefinitionID + * ProcessDefinitionName + * ProcessInstanceID + * ProcessInstanceName + * StatusCodeName + */ + type GetProcessInstancesDelegate = (object: ProcessDictionary) => void; + + /** + * Called when method to set active process is complete + * + * @param {string} status The result of the set active process operation. + * + * @remarks Values returned are: success (The operation succeeded.) + * invalid (The processInstanceId isn’t valid or the process isn’t enabled.) + */ + type SetProcessInstanceDelegate = (status: string) => void; + /** * Called when process change methods have completed. * @@ -2130,6 +2231,17 @@ declare namespace Xrm { */ type ProcessCallbackDelegate = (status: string) => void; + /** + * Called when process set status method has completed. + * + * @param {ProcessStatus} status The new status of the process instance + * + * @remarks Values returned are: active + * aborted + * finished + */ + type ProcessSetStatusDelegate = (status: ProcessStatus) => void; + /** * Represents a key-value pair, where the key is the Process Flow's ID, and the value is the name thereof. */ From c9123e006f43073c30f63f42c8e3e7d3a9246585 Mon Sep 17 00:00:00 2001 From: Roy Xue Date: Thu, 14 Sep 2017 17:03:28 -0700 Subject: [PATCH 044/486] Add new label type for X/YAxis --- types/recharts/index.d.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index ee3a8bba30..1e4431ed71 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -714,6 +714,13 @@ export interface XPadding { left: number; right: number; } +export interface XLabel { + value: string; + position?: string; + offset?: number; + stroke?: string; + fontSize?: number; +} export interface XAxisProps { hide?: boolean; dataKey?: string | number; @@ -737,7 +744,7 @@ export interface XAxisProps { tick?: boolean | any | React.ReactElement; mirror?: boolean; reversed?: boolean; - label?: string | number | React.ReactElement; + label?: string | number | React.ReactElement | XLabel; scale?: ScaleType | RechartsFunction; unit?: string | number; name?: string | number; @@ -757,6 +764,13 @@ export interface YPadding { top: number; bottom: number; } +export interface YLabel { + value: string; + position?: string; + offset?: number; + stroke?: string; + fontSize?: number; +} export interface YAxisProps { hide?: boolean; dataKey?: string | number; @@ -780,7 +794,7 @@ export interface YAxisProps { tick?: boolean | any | React.ReactElement; mirror?: boolean; reversed?: boolean; - label?: string | number | React.ReactElement; + label?: string | number | React.ReactElement | YLabel; scale?: ScaleType | RechartsFunction; unit?: string | number; name?: string | number; From b272cbc7fb000fffbf0752573f4c8b58ea7fec49 Mon Sep 17 00:00:00 2001 From: Roy Xue Date: Thu, 14 Sep 2017 17:10:00 -0700 Subject: [PATCH 045/486] Add contribution name --- types/recharts/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/recharts/index.d.ts b/types/recharts/index.d.ts index 1e4431ed71..b447eb0b14 100644 --- a/types/recharts/index.d.ts +++ b/types/recharts/index.d.ts @@ -2,6 +2,7 @@ // Project: http://recharts.org/ // Definitions by: Maarten Mulders // Raphael Mueller +// Roy Xue // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 From 6f17ccf0545c74907b6e4491a162bc509c051fb5 Mon Sep 17 00:00:00 2001 From: Amrit Kahlon Date: Thu, 14 Sep 2017 19:22:33 -0700 Subject: [PATCH 046/486] Added some missing members for google maps opening_hours --- types/googlemaps/index.d.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index b86057d5b6..686e030da9 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -2476,19 +2476,22 @@ declare namespace google.maps { } export interface OpeningHours { - open_now: boolean, - periods: OpeningPeriod[], - weekday_text: string[] + open_now: boolean; + periods: OpeningPeriod[]; + weekday_text: string[]; } export interface OpeningPeriod { - open: OpeningHoursTime, - close?: OpeningHoursTime + open: OpeningHoursTime; + close?: OpeningHoursTime; } export interface OpeningHoursTime { - day: number, - time: string + day: number; + hours: number; + minutes: number; + nextDate: number; + time: string; } export interface PredictionTerm { @@ -2549,12 +2552,13 @@ declare namespace google.maps { export interface PlaceResult { address_components: GeocoderAddressComponent[]; - aspects: PlaceAspectRating[]; /* Deprecated. Will be removed May 2, 2017 */ + adr_address: string; formatted_address: string; formatted_phone_number: string; geometry: PlaceGeometry; html_attributions: string[]; icon: string; + id: string; international_phone_number: string; name: string; opening_hours: OpeningHours; @@ -2566,6 +2570,7 @@ declare namespace google.maps { reviews: PlaceReview[]; types: string[]; url: string; + utc_offset: number; vicinity: string; website: string; } From 6b311ae78005ef7e157e3c510f2c8dcabaa338ed Mon Sep 17 00:00:00 2001 From: Amrit Kahlon Date: Thu, 14 Sep 2017 19:28:40 -0700 Subject: [PATCH 047/486] version bump --- types/googlemaps/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/googlemaps/index.d.ts b/types/googlemaps/index.d.ts index 686e030da9..e4fbe1e411 100644 --- a/types/googlemaps/index.d.ts +++ b/types/googlemaps/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Google Maps JavaScript API 3.26 +// Type definitions for Google Maps JavaScript API 3.29 // Project: https://developers.google.com/maps/ // Definitions by: Folia A/S , Chris Wrench , Kiarash Ghiaseddin , Grant Hutchins , Denis Atyasov , Michael McMullin , Martin Costello // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped From 5b1894866b8563f3f000a0de76b64f562c17caa1 Mon Sep 17 00:00:00 2001 From: Tyrone Dougherty Date: Fri, 15 Sep 2017 13:10:53 +1000 Subject: [PATCH 048/486] Update definitions for @types/angular-loading-bar to be accurate --- .../angular-loading-bar-tests.ts | 5 ++++- types/angular-loading-bar/index.d.ts | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/types/angular-loading-bar/angular-loading-bar-tests.ts b/types/angular-loading-bar/angular-loading-bar-tests.ts index 15435381f9..bcac00ff93 100644 --- a/types/angular-loading-bar/angular-loading-bar-tests.ts +++ b/types/angular-loading-bar/angular-loading-bar-tests.ts @@ -19,5 +19,8 @@ barConfig.push({ includeSpinner: true, includeBar: true, spinnerTemplate: 'template', - latencyThreshold: 100 + latencyThreshold: 100, + startSize: 0.02, + loadingBarTemplate: '', + autoIncrement: true }); diff --git a/types/angular-loading-bar/index.d.ts b/types/angular-loading-bar/index.d.ts index 1639ab115b..36bdf4d087 100644 --- a/types/angular-loading-bar/index.d.ts +++ b/types/angular-loading-bar/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for angular-loading-bar // Project: https://github.com/chieffancypants/angular-loading-bar -// Definitions by: Stephen Lautier +// Definitions by: Stephen Lautier +// Tyrone Dougherty // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -27,6 +28,11 @@ declare module 'angular' { */ spinnerTemplate?: string; + /** + * Loading bar template + */ + loadingBarTemplate?: string; + /** * Latency Threshold */ @@ -35,6 +41,16 @@ declare module 'angular' { * HTML element selector of parent */ parentSelector?: string; + + /** + * Starting size + */ + startSize?: number; + + /** + * Give illusion that there's always progress + */ + autoIncrement?: boolean; } } From 01bd29a7a0c35bc62aae6957a2523d4650113636 Mon Sep 17 00:00:00 2001 From: Tyrone Dougherty Date: Fri, 15 Sep 2017 13:13:01 +1000 Subject: [PATCH 049/486] Formatting update --- types/angular-loading-bar/index.d.ts | 62 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/types/angular-loading-bar/index.d.ts b/types/angular-loading-bar/index.d.ts index 36bdf4d087..b6ae9fbd8f 100644 --- a/types/angular-loading-bar/index.d.ts +++ b/types/angular-loading-bar/index.d.ts @@ -7,40 +7,38 @@ /// -import * as angular from 'angular'; - declare module 'angular' { - export namespace loadingBar { + export namespace loadingBar { - interface ILoadingBarProvider { - /** - * Turn the spinner on or off - */ - includeSpinner?: boolean; + interface ILoadingBarProvider { + /** + * Turn the spinner on or off + */ + includeSpinner?: boolean; - /** - * Turn the loading bar on or off - */ - includeBar?: boolean; + /** + * Turn the loading bar on or off + */ + includeBar?: boolean; - /** - * HTML template - */ - spinnerTemplate?: string; + /** + * HTML template + */ + spinnerTemplate?: string; /** * Loading bar template */ loadingBarTemplate?: string; - /** - * Latency Threshold - */ - latencyThreshold?: number; - /** - * HTML element selector of parent - */ - parentSelector?: string; + /** + * Latency Threshold + */ + latencyThreshold?: number; + /** + * HTML element selector of parent + */ + parentSelector?: string; /** * Starting size @@ -51,14 +49,14 @@ declare module 'angular' { * Give illusion that there's always progress */ autoIncrement?: boolean; - } - } + } + } - interface IRequestShortcutConfig { - /** - * Indicates that the loading bar should be hidden. - */ - ignoreLoadingBar?: boolean; - } + interface IRequestShortcutConfig { + /** + * Indicates that the loading bar should be hidden. + */ + ignoreLoadingBar?: boolean; + } } From 66990f9bb57ceef4019c65b150f034dde1352d76 Mon Sep 17 00:00:00 2001 From: Eric Byers Date: Thu, 14 Sep 2017 22:34:55 -0500 Subject: [PATCH 050/486] Adding type for the function instead of just Function --- types/sqs-consumer/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/sqs-consumer/index.d.ts b/types/sqs-consumer/index.d.ts index e567eb0211..e1d7b0168c 100644 --- a/types/sqs-consumer/index.d.ts +++ b/types/sqs-consumer/index.d.ts @@ -6,9 +6,11 @@ /// import { SQS } from "aws-sdk"; +export type ConsumerDone = (error?: Error) => void; + export interface Options { queueUrl: string; - handleMessage(message: SQS.Message, done: Function): any; + handleMessage(message: SQS.Message, done: ConsumerDone): any; region?: string; attributeNames?: string[]; messageAttributeNames?: string[]; From 17698b27a6068cf7f96e32247a13e4c60c6b6984 Mon Sep 17 00:00:00 2001 From: axetroy Date: Fri, 15 Sep 2017 11:45:16 +0800 Subject: [PATCH 051/486] [sequelize] describe the transaction's options as clearly as possible --- types/sequelize/index.d.ts | 53 +++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/types/sequelize/index.d.ts b/types/sequelize/index.d.ts index f52c233bbb..353f87b3e9 100644 --- a/types/sequelize/index.d.ts +++ b/types/sequelize/index.d.ts @@ -3263,7 +3263,7 @@ declare namespace sequelize { * Postgres also supports transaction.LOCK.KEY_SHARE, transaction.LOCK.NO_KEY_UPDATE and specific model * locks with joins. See [transaction.LOCK for an example](transaction#lock) */ - lock?: string | { level: string, of: Model }; + lock?: TransactionLockLevel | { level: TransactionLockLevel, of: Model }; /** * Return raw result. See sequelize.query for more information. @@ -5209,7 +5209,7 @@ declare namespace sequelize { * The maximum time, in milliseconds, that a connection can be idle before being released. */ idle?: number; - + /** * The maximum time, in milliseconds, that pool will try to get connection before throwing error */ @@ -5220,7 +5220,7 @@ declare namespace sequelize { * object, and that its state is not disconnected. */ validate?: (client?: any) => boolean; - + /* * The time interval, in milliseconds, for evicting stale connections */ @@ -5431,7 +5431,7 @@ declare namespace sequelize { * * Defaults to 'REPEATABLE_READ' */ - isolationLevel?: string; + isolationLevel?: TransactionIsolationLevel; /** * Set the default transaction type. See `Sequelize.Transaction.TYPES` for possible @@ -5439,7 +5439,7 @@ declare namespace sequelize { * * Defaults to 'DEFERRED' */ - transactionType?: string; + transactionType?: TransactionType; /** * Print query execution time in milliseconds when logging SQL. @@ -6153,37 +6153,54 @@ declare namespace sequelize { } + type TransactionIsolationLevelReadUncommitted = 'READ UNCOMMITTED'; + type TransactionIsolationLevelReadCommitted = 'READ COMMITTED'; + type TransactionIsolationLevelRepeatableRead = 'REPEATABLE READ'; + type TransactionIsolationLevelSerializable = 'SERIALIZABLE'; + type TransactionIsolationLevel = TransactionIsolationLevelReadUncommitted | TransactionIsolationLevelReadCommitted | TransactionIsolationLevelRepeatableRead | TransactionIsolationLevelSerializable; + /** * Isolations levels can be set per-transaction by passing `options.isolationLevel` to `sequelize.transaction`. * Default to `REPEATABLE_READ` but you can override the default isolation level by passing * `options.isolationLevel` in `new Sequelize`. */ interface TransactionIsolationLevels { - READ_UNCOMMITTED: string; // 'READ UNCOMMITTED' - READ_COMMITTED: string; // 'READ COMMITTED' - REPEATABLE_READ: string; // 'REPEATABLE READ' - SERIALIZABLE: string; // 'SERIALIZABLE' + READ_UNCOMMITTED: TransactionIsolationLevelReadUncommitted; // 'READ UNCOMMITTED' + READ_COMMITTED: TransactionIsolationLevelReadCommitted; // 'READ COMMITTED' + REPEATABLE_READ: TransactionIsolationLevelRepeatableRead; // 'REPEATABLE READ' + SERIALIZABLE: TransactionIsolationLevelSerializable; // 'SERIALIZABLE' } + type TransactionTypeDeferred = 'DEFERRED'; + type TransactionTypeImmediate = 'IMMEDIATE'; + type TransactionTypeExclusive = 'EXCLUSIVE'; + type TransactionType = TransactionTypeDeferred | TransactionTypeImmediate | TransactionTypeExclusive; + /** * Transaction type can be set per-transaction by passing `options.type` to `sequelize.transaction`. * Default to `DEFERRED` but you can override the default isolation level by passing * `options.transactionType` in `new Sequelize`. */ interface TransactionTypes { - DEFERRED: string; // 'DEFERRED' - IMMEDIATE: string; // 'IMMEDIATE' - EXCLUSIVE: string; // 'EXCLUSIVE' + DEFERRED: TransactionTypeDeferred; // 'DEFERRED' + IMMEDIATE: TransactionTypeImmediate; // 'IMMEDIATE' + EXCLUSIVE: TransactionTypeExclusive; // 'EXCLUSIVE' } + type TransactionLockLevelUpdate = 'UPDATE'; + type TransactionLockLevelShare = 'SHARE'; + type TransactionLockLevelKeyShare = 'KEY SHARE'; + type TransactionLockLevelNoKeyUpdate = 'NO KEY UPDATE'; + type TransactionLockLevel = TransactionLockLevelUpdate | TransactionLockLevelShare | TransactionLockLevelKeyShare | TransactionLockLevelNoKeyUpdate; + /** * Possible options for row locking. Used in conjuction with `find` calls: */ interface TransactionLock { - UPDATE: string; // 'UPDATE' - SHARE: string; // 'SHARE' - KEY_SHARE: string; // 'KEY SHARE' - NO_KEY_UPDATE: string; // 'NO KEY UPDATE' + UPDATE: TransactionLockLevelUpdate; // 'UPDATE' + SHARE: TransactionLockLevelShare; // 'SHARE' + KEY_SHARE: TransactionLockLevelKeyShare; // 'KEY SHARE' + NO_KEY_UPDATE: TransactionLockLevelNoKeyUpdate; // 'NO KEY UPDATE' } /** @@ -6198,12 +6215,12 @@ declare namespace sequelize { /** * See `Sequelize.Transaction.ISOLATION_LEVELS` for possible options */ - isolationLevel?: string; + isolationLevel?: TransactionIsolationLevel; /** * See `Sequelize.Transaction.TYPES` for possible options */ - type?: string; + type?: TransactionType; /** * A function that gets executed while running the query to log the sql. From be2744e234f5644a71a024960a2c2f9d5a87a6d9 Mon Sep 17 00:00:00 2001 From: Eric Byers Date: Thu, 14 Sep 2017 22:54:49 -0500 Subject: [PATCH 052/486] Adding a test --- types/sqs-consumer/index.d.ts | 2 +- types/sqs-consumer/sqs-consumer-tests.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/sqs-consumer/index.d.ts b/types/sqs-consumer/index.d.ts index e1d7b0168c..dfc61f3933 100644 --- a/types/sqs-consumer/index.d.ts +++ b/types/sqs-consumer/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for sqs-consumer 3.5 // Project: https://github.com/BBC/sqs-consumer -// Definitions by: Daniel Chao +// Definitions by: Daniel Chao , Eric Byers // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// diff --git a/types/sqs-consumer/sqs-consumer-tests.ts b/types/sqs-consumer/sqs-consumer-tests.ts index 7b7ba94530..b76c5116ba 100644 --- a/types/sqs-consumer/sqs-consumer-tests.ts +++ b/types/sqs-consumer/sqs-consumer-tests.ts @@ -1,4 +1,5 @@ import * as Consumer from "sqs-consumer"; +import { SQS } from "aws-sdk"; const app = Consumer.create({ queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name', @@ -19,6 +20,16 @@ const app2 = Consumer.create({ waitTimeSeconds: 50 }); +// Test message handler. +const handleMessage = (message: SQS.Message, done: Consumer.ConsumerDone) => { + done(); +}; + +const app3 = Consumer.create({ + queueUrl: 'https://sqs.eu-west-1.amazonaws.com/account-id/queue-name', + handleMessage +}); + app.on('error', (err: any) => { console.log(err.message); }); From 2d8711df7dea18eddd802fb8954f25bc654aca0a Mon Sep 17 00:00:00 2001 From: Tyrone Dougherty Date: Fri, 15 Sep 2017 14:45:12 +1000 Subject: [PATCH 053/486] Try to fix tests for angular-loading-bar types --- types/angular-loading-bar/angular-loading-bar-tests.ts | 1 - types/angular-loading-bar/index.d.ts | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/angular-loading-bar/angular-loading-bar-tests.ts b/types/angular-loading-bar/angular-loading-bar-tests.ts index bcac00ff93..be39a7a54d 100644 --- a/types/angular-loading-bar/angular-loading-bar-tests.ts +++ b/types/angular-loading-bar/angular-loading-bar-tests.ts @@ -1,5 +1,4 @@ - var app = angular.module('testModule', ['angular-loading-bar']); class TestController { diff --git a/types/angular-loading-bar/index.d.ts b/types/angular-loading-bar/index.d.ts index b6ae9fbd8f..b17e09961a 100644 --- a/types/angular-loading-bar/index.d.ts +++ b/types/angular-loading-bar/index.d.ts @@ -7,6 +7,8 @@ /// +import * as angular from 'angular'; + declare module 'angular' { export namespace loadingBar { From 15d5afb01b6cc7f083349fa9183c99ff56ced7e2 Mon Sep 17 00:00:00 2001 From: Ifiok Jr Date: Fri, 15 Sep 2017 07:32:35 +0100 Subject: [PATCH 054/486] feat(react-native-elements): pull from iRoachie --- types/react-native-elements/README.md | 4 +- types/react-native-elements/index.d.ts | 221 +++++++++++++++++- .../react-native-elements-tests.tsx | 169 +++++++++++++- 3 files changed, 381 insertions(+), 13 deletions(-) diff --git a/types/react-native-elements/README.md b/types/react-native-elements/README.md index 64f9f69538..4dfe95d256 100644 --- a/types/react-native-elements/README.md +++ b/types/react-native-elements/README.md @@ -16,12 +16,12 @@ List will update as typings are added - [ ] Badge - [ ] Tab Bar Component - [x] HTML style headings -- [ ] Card component +- [x] Card component - [ ] Pricing Component - [ ] Grid Component - [ ] Slider Component - [ ] Tile Component -- [ ] Avatar Component +- [x] Avatar Component - [ ] Rating Component - [ ] SwipeDeck Component - [ ] Header Component diff --git a/types/react-native-elements/index.d.ts b/types/react-native-elements/index.d.ts index a3c1f693ef..e838b0dd27 100644 --- a/types/react-native-elements/index.d.ts +++ b/types/react-native-elements/index.d.ts @@ -5,7 +5,18 @@ // TypeScript Version: 2.3 import * as React from 'react'; -import { ViewStyle, TextStyle } from 'react-native'; +import { ViewStyle, TextStyle, ImageStyle, ImageURISource } from 'react-native'; + +export interface Icon { + name?: string; + color?: string; + size?: number; + type?: 'material' | 'material-community' | 'simple-line-icon' | 'zocial' | 'font-awesome' | 'octicon' | 'ionicon' | 'foundation' | 'evilicon' | 'entypo'; +} + +export interface AvatarIcon extends Icon { + iconStyle?: TextStyle; +} export interface TextProps { /** @@ -42,15 +53,125 @@ export interface TextProps { /** * HTML Style Headings * - * @desc https://react-native-training.github.io/react-native-elements/API/HTML_style_headings/ + * @see https://react-native-training.github.io/react-native-elements/API/HTML_style_headings/ */ export class Text extends React.Component {} -export interface ButtonIcon { - name?: string; - color?: string; - size?: number; - type?: 'material' | 'material-community' | 'simple-line-icon' | 'zocial' | 'font-awesome' | 'octicon' | 'ionicon' | 'foundation' | 'evilicon' | 'entypo'; +export interface AvatarProps { + /** + * Component for enclosing element (eg: TouchableHighlight, View, etc) + * + * @default TouchableOpacity + */ + component?: React.ComponentClass; + + /** + * Width for the Avatar + * + * @default 34 + */ + width?: number; + + /** + * Height for the Avatar + * + * @default 34 + */ + height?: number; + + /** + * Callback function when pressing component + */ + onPress?(): void; + + /** + * Callback function when long pressing component + */ + onLongPress?(): void; + + /** + * Styling for outer container + */ + containerStyle?: ViewStyle; + + /** + * Image source + */ + source?: ImageURISource; + + /** + * Style for avatar image + */ + avatarStyle?: ImageStyle; + + /** + * Determines the shape of avatar + * + * @default false + */ + rounded?: boolean; + + /** + * Renders title in the avatar + */ + title?: string; + + /** + * Style for the title + */ + titleStyle?: TextStyle; + + /** + * Style for the view outside image or icon + */ + overlayContainerStyle?: ViewStyle; + + /** + * Opacity when pressed + * + * @default 0.2 + */ + activeOpacity?: number; + + /** + * Icon for the avatar + */ + icon?: AvatarIcon; + + /** + * extra styling for icon component (optional) + */ + iconStyle?: TextStyle; + + /** + * Small sized icon + */ + small?: boolean; + + /** + * Medium sized icon + */ + medium?: boolean; + + /** + * Large sized icon + */ + large?: boolean; + + /** + * Extra-large sized icon + */ + xlarge?: boolean; +} + +/** + * Avatar Component + * + * @see https://react-native-training.github.io/react-native-elements/API/avatar/ + */ +export class Avatar extends React.Component {} + +export interface ButtonIcon extends Icon { buttonStyle?: TextStyle; } @@ -251,3 +372,89 @@ export interface BadgeProperties { * @see https://react-native-training.github.io/react-native-elements/API/badge/ */ export class Badge extends React.Component {} + +export interface CardProps { + /** + * Flex direction (row or column) + * + * @default 'column' + */ + flexDirection?: 'column' | 'row'; + + /** + * Outer container style + */ + containerStyle?: ViewStyle; + + /** + * Inner container style + */ + wrapperStyle?: ViewStyle; + + /** + * Card title + */ + title?: string; + + /** + * Additional title styling (if title provided) + */ + titleStyle?: TextStyle; + + /** + * Title rendered over the image + * (only works if image prop is present) + */ + featuredTitle?: string; + + /** + * Styling for featured title + */ + featuredTitleStyle?: TextStyle; + + /** + * Subtitle rendered over the image + * (only works if image prop is present) + */ + featuredSubtitle?: string; + + /** + * Styling for featured subtitle + */ + featuredSubtitleStyle?: TextStyle; + + /** + * Additional divider styling + * (if title provided) + */ + dividerStyle?: ViewStyle; + + /** + * Specify different font family + * + * @default System font bold (iOS), Sans Serif Bold (android) + */ + fontFamily?: string; + + /** + * Specify image styling if image is provided + */ + imageStyle?: ImageStyle; + + /** + * Specify styling for view surrounding image + */ + imageWrapperStyle?: ViewStyle; + + /** + * Add an image as the heading with the image prop + */ + image?: ImageURISource; +} + +/** + * Card component + * + * @see https://react-native-training.github.io/react-native-elements/API/card/ + */ +export class Card extends React.Component {} diff --git a/types/react-native-elements/react-native-elements-tests.tsx b/types/react-native-elements/react-native-elements-tests.tsx index d2042b4ff1..5a9db2fd2a 100644 --- a/types/react-native-elements/react-native-elements-tests.tsx +++ b/types/react-native-elements/react-native-elements-tests.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; -import { View, StyleSheet, TouchableNativeFeedback } from 'react-native'; -import { Button, Text, Badge } from 'react-native-elements'; +import { View, StyleSheet, TouchableNativeFeedback, Image } from 'react-native'; +import { Button, Text, Badge, Avatar, Card } from 'react-native-elements'; class TextTest extends React.Component { render() { @@ -15,6 +15,117 @@ class TextTest extends React.Component { } } +class AvatarTest extends React.Component { + render() { + return ( + + + Avatars + console.log("Works!")} + activeOpacity={0.7} + /> + console.log("Works!")} + activeOpacity={0.7} + /> + console.log("Works!")} + activeOpacity={0.7} + /> + console.log("Works!")} + activeOpacity={0.7} + /> + + + + Avatar with initials + console.log("Works!")} + activeOpacity={0.7} + /> + console.log("Works!")} + activeOpacity={0.7} + /> + console.log("Works!")} + activeOpacity={0.7} + /> + console.log("Works!")} + activeOpacity={0.7} + /> + + + + Avatar with icons + console.log("Works!")} + activeOpacity={0.7} + containerStyle={{flex: 2, marginLeft: 20, marginTop: 115}} + /> + console.log("Works!")} + activeOpacity={0.7} + containerStyle={{flex: 3, marginTop: 100}} + /> + console.log("Works!")} + activeOpacity={0.7} + containerStyle={{flex: 4, marginTop: 75}} + /> + console.log("Works!")} + activeOpacity={0.7} + containerStyle={{flex: 5, marginRight: 60}} + /> + + + ); + } +} + +const AvatarStyles = StyleSheet.create({ + title: { + fontSize: 30, + marginBottom: 10 + } +}); + class BadgeTest extends React.Component { render() { return ( @@ -64,15 +175,65 @@ class ButtonTest extends React.Component { } +; + +; + +const CustomInput: React.SFC & {field?: string}> = + ({field, ...rest}) => { + return ( + + {({ setValue, getValue, setTouched }) => { + return ( + setValue(e.target.value)} + onBlur={() => setTouched(true)} + /> + ); + }} + + ); + }; + +const events = { + onChange: (e: React.SyntheticEvent, cb: () => void): null => null, + onBlur: (e: React.SyntheticEvent, cb: () => void): null => null +}; +const onClick = (e: React.SyntheticEvent, cb: () => void): null => null; + +; + +; +; + +